]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/toolchain/ToolChainInfo.java
Added copyright&license header.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / toolchain / ToolChainInfo.java
index 146f6e5a131b3ee9f8aa0204ba5cbcea6e2d4cc3..7bf9dd6b8fe50628459787864c531f7ea221af52 100644 (file)
@@ -1,3 +1,16 @@
+/** @file\r
+This file is to define  ToolChainInfo class.\r
+\r
+Copyright (c) 2006, Intel Corporation\r
+All rights reserved. This program and the accompanying materials\r
+are licensed and made available under the terms and conditions of the BSD License\r
+which accompanies this distribution.  The full text of the license may be found at\r
+http://opensource.org/licenses/bsd-license.php\r
+\r
+THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
+WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
+**/\r
+\r
 package org.tianocore.build.toolchain;\r
 \r
 import java.util.HashMap;\r
@@ -6,17 +19,31 @@ import java.util.Map;
 import java.util.Set;\r
 \r
 public class ToolChainInfo {\r
-\r
+    //\r
+    // build target set\r
+    // \r
     private Set<String> targets = new LinkedHashSet<String>();\r
-    \r
+    //\r
+    // tool chain tag name set\r
+    // \r
     private Set<String> tagnames = new LinkedHashSet<String>();\r
-    \r
+    //\r
+    // build archs set\r
+    // \r
     private Set<String> archs = new LinkedHashSet<String>();\r
-    \r
+    //\r
+    // build commands set\r
+    // \r
     private Set<String> commands = new LinkedHashSet<String>();\r
-\r
+    //\r
+    // build commands for specific tool chain\r
+    // \r
     private Map<String, Set<String>> commandMap = new HashMap<String, Set<String>>();\r
-    \r
+    /**\r
+     Add a list of targets in the form of string separated by space\r
+\r
+     @param targetList target list string\r
+     **/\r
     public void addTargets(String targetList) {\r
         //\r
         // targetList some targets separated by space " "\r
@@ -27,7 +54,11 @@ public class ToolChainInfo {
         }\r
         addTargets(targetList.split(" "));\r
     }\r
-    \r
+    /**\r
+     Add a list of targets in the form of string array\r
+     \r
+     @param targetArray target string array\r
+     **/\r
     public void addTargets(String[] targetArray) {\r
         if (targetArray == null ) {\r
             return ;\r
@@ -36,11 +67,19 @@ public class ToolChainInfo {
             targets.add(targetArray[i]);\r
         }\r
     }\r
-    \r
+    /**\r
+     Add a list of target in the form of set\r
+     \r
+     @param targetSet target string set\r
+     **/\r
     public void addTargets(Set<String> targetSet) {\r
         targets.addAll(targetSet);\r
     }\r
-    \r
+    /**\r
+       Add a list of tool chain tag name in the form of string separated by space\r
+\r
+       @param tagnameList\r
+     **/\r
     public void addTagnames(String tagnameList) {\r
         //\r
         // tagnameList some tagnames separated by space " "\r
@@ -142,18 +181,14 @@ public class ToolChainInfo {
         result.addTargets(union(this.targets, info.targets));\r
         result.addTagnames(union(this.tagnames, info.tagnames));\r
         result.addArchs(union(this.archs, info.archs));\r
-        //result.addCommands(union(this.getCommands(), info.getCommands()));\r
         return result;\r
     }\r
     \r
     public ToolChainInfo intersection(ToolChainInfo info) {\r
-//        System.out.println(this + "\n" + info);\r
         ToolChainInfo result = new ToolChainInfo();\r
         result.addTargets(intersection(this.targets, info.targets));\r
         result.addTagnames(intersection(this.tagnames, info.tagnames));\r
         result.addArchs(intersection(this.archs, info.archs));\r
-        // result.addCommands(union(this.commands, info.commands));\r
-//        System.out.println("result: " + result);\r
         return result;\r
     }\r
     \r
@@ -182,7 +217,6 @@ public class ToolChainInfo {
             result.retainAll(set2);\r
         }\r
 \r
-//        result.remove("*");\r
         return result;\r
     }\r
     \r