]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java
- Fixed EDKT240. Now the Blank.pad file for alignment purpose will no longer be needed.
[mirror_edk2.git] / Tools / Java / Source / GenBuild / org / tianocore / build / global / SurfaceAreaQuery.java
index 17f7541e093594c61d767d03efd4f976f7e7e925..b95c389592a051a011fa0d8e38e62c06d4a3fdd3 100644 (file)
@@ -38,6 +38,7 @@ import org.tianocore.build.id.PackageIdentification;
 import org.tianocore.build.id.PlatformIdentification;\r
 import org.tianocore.build.toolchain.ToolChainInfo;\r
 import org.tianocore.common.exception.EdkException;\r
+import org.tianocore.common.definitions.EdkDefinitions;\r
 import org.w3c.dom.Node;\r
 \r
 /**\r
@@ -593,7 +594,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns null if nothing is there\r
      */\r
-    public String[] getLibraryClasses(String usage, String arch) {\r
+    public String[] getLibraryClasses(String usage, String arch, String moduleType) {\r
         String[] xPath;\r
         if (usage == null || usage.equals("")) {\r
             xPath = new String[] { "/LibraryClass" };\r
@@ -610,8 +611,9 @@ public class SurfaceAreaQuery {
         List<String> libraryClassName = new ArrayList<String>();\r
         for (int i = 0; i < libraryClassList.length; i++) {\r
                        List archList = libraryClassList[i].getSupArchList();\r
-\r
-                       if (arch == null || contains(archList, arch)) {\r
+            List moduleTypeList = libraryClassList[i].getSupModuleList();\r
+                       if ((arch == null || contains(archList, arch))\r
+                && (moduleType == null || contains(moduleTypeList, moduleType))) {\r
                 libraryClassName.add(libraryClassList[i].getKeyword());\r
                        }\r
         }\r
@@ -1490,6 +1492,22 @@ public class SurfaceAreaQuery {
         return a.getDomNode();\r
     }\r
 \r
+    public Node[] getFpdUserExtensions() {\r
+        String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and not(@Identifier='1') and not(@Identifier='0')]" };\r
+\r
+        Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
+        if (queryResult == null || queryResult.length == 0) {\r
+            return new Node[0];\r
+        }\r
+\r
+        Node[] nodeList = new Node[queryResult.length];\r
+        for (int i = 0; i < queryResult.length; ++i) {\r
+            UserExtensionsDocument.UserExtensions a =  (UserExtensionsDocument.UserExtensions)queryResult[i];\r
+            nodeList[i] = a.getDomNode();\r
+        }\r
+\r
+        return nodeList;\r
+    }\r
     /**\r
      * Retrieve FV image option information\r
      *\r
@@ -2008,15 +2026,8 @@ public class SurfaceAreaQuery {
                if (list == null || list.size()== 0) {\r
                        return true;\r
                }\r
-        Iterator it = list.iterator();\r
-        while (it.hasNext()) {\r
-            String s = (String)it.next();\r
-            if (s.equalsIgnoreCase(str)) {\r
-                return true;\r
-            }\r
-        }\r
 \r
-        return false;\r
+        return list.contains(str);\r
     }\r
 \r
        public boolean isHaveTianoR8FlashMap(){\r