]> git.proxmox.com Git - mirror_edk2.git/commitdiff
Remove static from SurfaceAreaQuery.java for preparing parallel build.(1)
authorwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 1 Sep 2006 09:28:15 +0000 (09:28 +0000)
committerwuyizhong <wuyizhong@6f19259b-4bc3-4df7-8a09-765794883524>
Fri, 1 Sep 2006 09:28:15 +0000 (09:28 +0000)
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1428 6f19259b-4bc3-4df7-8a09-765794883524

Tools/Source/GenBuild/org/tianocore/build/FfsProcess.java
Tools/Source/GenBuild/org/tianocore/build/GenBuildTask.java
Tools/Source/GenBuild/org/tianocore/build/ModuleBuildFileGenerator.java
Tools/Source/GenBuild/org/tianocore/build/autogen/AutoGen.java
Tools/Source/GenBuild/org/tianocore/build/autogen/AutogenLibOrder.java
Tools/Source/GenBuild/org/tianocore/build/fpd/FpdParserTask.java
Tools/Source/GenBuild/org/tianocore/build/fpd/PlatformBuildFileGenerator.java
Tools/Source/GenBuild/org/tianocore/build/global/GlobalData.java
Tools/Source/GenBuild/org/tianocore/build/global/Spd.java
Tools/Source/GenBuild/org/tianocore/build/global/SurfaceAreaQuery.java

index cb699da34e28d1f994426d71ed21f9e5c0fe7ef8..66ad11ab5567675fd3e0d79382f51b24fd1fa4b6 100644 (file)
@@ -84,6 +84,12 @@ public class FfsProcess {
     ///\r
     public static final String[][] sectionExt = EdkDefinitions.SectionTypeExtensions;\r
 \r
+    private SurfaceAreaQuery saq = null;\r
+    \r
+    public FfsProcess(SurfaceAreaQuery saq) {\r
+        this.saq = saq;\r
+    }\r
+    \r
     /**\r
       search in the type, if componentType is listed in type, return true; \r
       otherwise return false.\r
@@ -115,9 +121,9 @@ public class FfsProcess {
         //\r
         // Try to find Ffs layout from FPD file\r
         //\r
-        SurfaceAreaQuery.push(GlobalData.getFpdBuildOptions());\r
-        BuildOptionsDocument.BuildOptions.Ffs[] ffsArray = SurfaceAreaQuery.getFpdFfs();\r
-        SurfaceAreaQuery.pop();\r
+        saq.push(GlobalData.getFpdBuildOptions());\r
+        BuildOptionsDocument.BuildOptions.Ffs[] ffsArray = saq.getFpdFfs();\r
+        saq.pop();\r
         for (int i = 0; i < ffsArray.length; i++) {\r
             if (isMatch(ffsArray[i].getFfsKey(), buildType)) {\r
                 ffsXmlObject = ffsArray[i];\r
index 7ec12b042721d9f6c1403c7c65d443e882e8d4e3..c5fb00b3e095f475bd424d60f77d36ef1475b157 100644 (file)
@@ -108,6 +108,8 @@ public class GenBuildTask extends Ant {
     private Vector<Property> properties = new Vector<Property>();\r
 \r
     private boolean isSingleModuleBuild = false;\r
+    \r
+    private SurfaceAreaQuery saq = null;\r
 \r
     /**\r
       Public construct method. It is necessary for ANT task.\r
@@ -154,14 +156,14 @@ public class GenBuildTask extends Ant {
             moduleId = new ModuleIdentification(moduleGuid, moduleVersion);\r
             moduleId.setPackage(packageId);\r
             Map<String, XmlObject> doc = GlobalData.getNativeMsa(moduleId);\r
-            SurfaceAreaQuery.setDoc(doc);\r
-            moduleId = SurfaceAreaQuery.getMsaHeader();\r
+            saq = new SurfaceAreaQuery(doc);\r
+            moduleId = saq.getMsaHeader();\r
         } else {\r
             Map<String, XmlObject> doc = GlobalData.getNativeMsa(msaFile);\r
-            SurfaceAreaQuery.setDoc(doc);\r
-            moduleId = SurfaceAreaQuery.getMsaHeader();\r
+            saq = new SurfaceAreaQuery(doc);\r
+            moduleId = saq.getMsaHeader();\r
         }\r
-        String[] producedLibraryClasses = SurfaceAreaQuery.getLibraryClasses("ALWAYS_PRODUCED",null);\r
+        String[] producedLibraryClasses = saq.getLibraryClasses("ALWAYS_PRODUCED",null);\r
         if (producedLibraryClasses.length == 0) {\r
             moduleId.setLibrary(false);\r
         } else {\r
@@ -221,7 +223,7 @@ public class GenBuildTask extends Ant {
         //\r
         // Judge if arch is all supported by current module. If not, throw Exception.\r
         //\r
-        List moduleSupportedArchs = SurfaceAreaQuery.getModuleSupportedArchs();\r
+        List moduleSupportedArchs = saq.getModuleSupportedArchs();\r
         if (moduleSupportedArchs != null) {\r
             for (int k = 0; k < archList.length; k++) {\r
                 if ( ! moduleSupportedArchs.contains(archList[k])) {\r
@@ -277,7 +279,7 @@ public class GenBuildTask extends Ant {
 \r
                     System.out.println("Build " + moduleId + " start >>>");\r
                     System.out.println("Target: " + targetList[i] + " Tagname: " + toolchainList[j] + " Arch: " + archList[k]);\r
-                    SurfaceAreaQuery.setDoc(GlobalData.getDoc(fpdModuleId));\r
+                    saq.push(GlobalData.getDoc(fpdModuleId));\r
 \r
                     //\r
                     // Prepare for all other common properties\r
@@ -377,7 +379,7 @@ public class GenBuildTask extends Ant {
         // MODULE_DIR, MODULE_RELATIVE_DIR\r
         //\r
         PropertyManager.setProperty("MODULE", moduleId.getName());\r
-        String baseName = SurfaceAreaQuery.getModuleOutputFileBasename();\r
+        String baseName = saq.getModuleOutputFileBasename();\r
         if (baseName == null) {\r
             PropertyManager.setProperty("BASE_NAME", moduleId.getName());\r
         } else {\r
@@ -539,13 +541,11 @@ public class GenBuildTask extends Ant {
 \r
     private void applyBuild(String buildTarget, String buildTagname, FpdModuleIdentification fpdModuleId) throws BuildException{\r
         //\r
-        // AutoGen\r
+        // Call AutoGen to generate AutoGen.c and AutoGen.h\r
         //\r
-\r
-        AutoGen autogen = new AutoGen(getProject().getProperty("FV_DIR"), getProject().getProperty("DEST_DIR_DEBUG"), fpdModuleId.getModule(),fpdModuleId.getArch());\r
+        AutoGen autogen = new AutoGen(getProject().getProperty("FV_DIR"), getProject().getProperty("DEST_DIR_DEBUG"), fpdModuleId.getModule(),fpdModuleId.getArch(), saq);\r
         autogen.genAutogen();\r
 \r
-\r
         //\r
         // Get compiler flags\r
         //\r
@@ -559,7 +559,7 @@ public class GenBuildTask extends Ant {
         //\r
         // Prepare LIBS\r
         //\r
-        ModuleIdentification[] libinstances = SurfaceAreaQuery.getLibraryInstance(fpdModuleId.getArch());\r
+        ModuleIdentification[] libinstances = saq.getLibraryInstance(fpdModuleId.getArch());\r
         String propertyLibs = "";\r
         for (int i = 0; i < libinstances.length; i++) {\r
             propertyLibs += " " + getProject().getProperty("BIN_DIR") + File.separatorChar + libinstances[i].getName() + ".lib";\r
@@ -588,8 +588,8 @@ public class GenBuildTask extends Ant {
         // Generate ${BASE_NAME}_build.xml\r
         // TBD\r
         //\r
-        String ffsKeyword = SurfaceAreaQuery.getModuleFfsKeyword();\r
-        ModuleBuildFileGenerator fileGenerator = new ModuleBuildFileGenerator(getProject(), ffsKeyword, fpdModuleId, includes);\r
+        String ffsKeyword = saq.getModuleFfsKeyword();\r
+        ModuleBuildFileGenerator fileGenerator = new ModuleBuildFileGenerator(getProject(), ffsKeyword, fpdModuleId, includes, saq);\r
         String buildFilename = getProject().getProperty("DEST_DIR_OUTPUT") + File.separatorChar + moduleId.getName() + "_build.xml";\r
         fileGenerator.genBuildFile(buildFilename);\r
 \r
@@ -721,7 +721,7 @@ public class GenBuildTask extends Ant {
         //\r
         // Packages in PackageDenpendencies\r
         //\r
-        PackageIdentification[] packageDependencies = SurfaceAreaQuery.getDependencePkg(fpdModuleId.getArch());\r
+        PackageIdentification[] packageDependencies = saq.getDependencePkg(fpdModuleId.getArch());\r
         for (int i = 0; i < packageDependencies.length; i++) {\r
             GlobalData.refreshPackageIdentification(packageDependencies[i]);\r
             File packageFile = packageDependencies[i].getSpdFile();\r
@@ -732,17 +732,17 @@ public class GenBuildTask extends Ant {
         //\r
         // All Dependency Library Instance's PackageDependencies\r
         //\r
-        ModuleIdentification[] libinstances = SurfaceAreaQuery.getLibraryInstance(fpdModuleId.getArch());\r
+        ModuleIdentification[] libinstances = saq.getLibraryInstance(fpdModuleId.getArch());\r
         for (int i = 0; i < libinstances.length; i++) {\r
-            SurfaceAreaQuery.push(GlobalData.getDoc(libinstances[i], fpdModuleId.getArch()));\r
-            PackageIdentification[] libraryPackageDependencies = SurfaceAreaQuery.getDependencePkg(fpdModuleId.getArch());\r
+            saq.push(GlobalData.getDoc(libinstances[i], fpdModuleId.getArch()));\r
+            PackageIdentification[] libraryPackageDependencies = saq.getDependencePkg(fpdModuleId.getArch());\r
             for (int j = 0; j < libraryPackageDependencies.length; j++) {\r
                 GlobalData.refreshPackageIdentification(libraryPackageDependencies[j]);\r
                 File packageFile = libraryPackageDependencies[j].getSpdFile();\r
                 includes.add(packageFile.getParent() + File.separatorChar + "Include");\r
                 includes.add(packageFile.getParent() + File.separatorChar + "Include" + File.separatorChar + archDir(arch));\r
             }\r
-            SurfaceAreaQuery.pop();\r
+            saq.pop();\r
         }\r
         \r
         \r
index 34b3771a993c6a7306ea24251167c727a2ca8a25..1bdae21245f594cadb2a82ebd24582d542d86527 100644 (file)
@@ -65,11 +65,14 @@ public class ModuleBuildFileGenerator {
     \r
     private String[] includes;\r
     \r
-    public ModuleBuildFileGenerator(Project project, String ffsKeyword, FpdModuleIdentification fpdModuleId, String[] includes) {\r
+    private SurfaceAreaQuery saq = null;\r
+    \r
+    public ModuleBuildFileGenerator(Project project, String ffsKeyword, FpdModuleIdentification fpdModuleId, String[] includes, SurfaceAreaQuery saq) {\r
         this.project = project;\r
         this.fpdModuleId = fpdModuleId;\r
         this.ffsKeyword = ffsKeyword;\r
         this.includes = includes;\r
+        this.saq = saq;\r
     }\r
     \r
     /**\r
@@ -88,7 +91,7 @@ public class ModuleBuildFileGenerator {
               Error throws during BaseName_build.xml generating. \r
     **/\r
     public void genBuildFile(String buildFilename) throws BuildException {\r
-        FfsProcess fp = new FfsProcess();\r
+        FfsProcess fp = new FfsProcess(saq);\r
         DocumentBuilderFactory domfac = DocumentBuilderFactory.newInstance();\r
         try {\r
             DocumentBuilder dombuilder = domfac.newDocumentBuilder();\r
@@ -293,7 +296,7 @@ public class ModuleBuildFileGenerator {
       @param root Root element for current\r
     **/\r
     private void applyLibraryInstance(Document document, Node root) {\r
-        ModuleIdentification[] libinstances = SurfaceAreaQuery.getLibraryInstance(fpdModuleId.getArch());\r
+        ModuleIdentification[] libinstances = saq.getLibraryInstance(fpdModuleId.getArch());\r
         for (int i = 0; i < libinstances.length; i++) {\r
             //\r
             // Put package file path to module identification\r
@@ -341,7 +344,7 @@ public class ModuleBuildFileGenerator {
         //\r
         // sourceFiles[][0] is FileType, [][1] is File name relative to Module_Dir\r
         //\r
-        String[][] sourceFiles = SurfaceAreaQuery.getSourceFiles(fpdModuleId.getArch());\r
+        String[][] sourceFiles = saq.getSourceFiles(fpdModuleId.getArch());\r
 \r
         FileProcess fileProcess = new FileProcess();\r
         fileProcess.init(project, includes, document);\r
index e385dea64eb7bb8324e45400adc3bd6f48dc177b..08b44f9eb47a871d398ef64e32972f805e06cc2a 100644 (file)
@@ -116,6 +116,7 @@ public class AutoGen {
     private List<String> setVirtalAddList = new ArrayList<String>();\r
     private List<String> exitBootServiceList = new ArrayList<String>();\r
 \r
+    private SurfaceAreaQuery saq = null;\r
 \r
     /**\r
       Construct function\r
@@ -131,12 +132,12 @@ public class AutoGen {
       @param arch\r
                  Target architecture.\r
     **/\r
-    public AutoGen(String fvDir, String outputPath, ModuleIdentification moduleId, String arch) {\r
+    public AutoGen(String fvDir, String outputPath, ModuleIdentification moduleId, String arch, SurfaceAreaQuery saq) {\r
         this.outputPath = outputPath;\r
         this.moduleId = moduleId;\r
         this.arch = arch;\r
         this.fvDir = fvDir;\r
-\r
+        this.saq = saq;\r
     }\r
 \r
     /**\r
@@ -314,7 +315,7 @@ public class AutoGen {
         // be got from module surface area instead of hard code by it's\r
         // moduleType.\r
         //\r
-        moduleType = SurfaceAreaQuery.getModuleType();\r
+        moduleType = saq.getModuleType();\r
 \r
         //\r
         // Add "extern int __make_me_compile_correctly;" at begin of\r
@@ -325,7 +326,7 @@ public class AutoGen {
         //\r
         // Put EFI_SPECIFICATION_VERSION, and EDK_RELEASE_VERSION.\r
         //\r
-        String[] specList = SurfaceAreaQuery.getExternSpecificaiton();\r
+        String[] specList = saq.getExternSpecificaiton();\r
         for (int i = 0; i < specList.length; i++) {\r
             fileBuffer.append(CommonDefinition.DEFINE + specList[i]\r
                               + "\r\n");\r
@@ -335,8 +336,7 @@ public class AutoGen {
         //\r
         // PackageIdentification[] consumedPkgIdList = SurfaceAreaQuery\r
         // .getDependencePkg(this.arch);\r
-        PackageIdentification[] consumedPkgIdList = SurfaceAreaQuery\r
-                                                    .getDependencePkg(this.arch);\r
+        PackageIdentification[] consumedPkgIdList = saq.getDependencePkg(this.arch);\r
         if (consumedPkgIdList != null) {\r
             headerFileList = depPkgToAutogenH(consumedPkgIdList, moduleType);\r
             item = headerFileList.iterator();\r
@@ -348,8 +348,7 @@ public class AutoGen {
         //\r
         // Write library class's related *.h file to autogen.h.\r
         //\r
-        String[] libClassList = SurfaceAreaQuery\r
-                                .getLibraryClasses(CommonDefinition.ALWAYSCONSUMED,this.arch);\r
+        String[] libClassList = saq.getLibraryClasses(CommonDefinition.ALWAYSCONSUMED,this.arch);\r
         if (libClassList != null) {\r
             libClassIncludeH = LibraryClassToAutogenH(libClassList);\r
             item = libClassIncludeH.iterator();\r
@@ -358,8 +357,7 @@ public class AutoGen {
             }\r
         }\r
 \r
-        libClassList = SurfaceAreaQuery\r
-                       .getLibraryClasses(CommonDefinition.ALWAYSPRODUCED, this.arch);\r
+        libClassList = saq.getLibraryClasses(CommonDefinition.ALWAYSPRODUCED, this.arch);\r
         if (libClassList != null) {\r
             libClassIncludeH = LibraryClassToAutogenH(libClassList);\r
             item = libClassIncludeH.iterator();\r
@@ -373,7 +371,7 @@ public class AutoGen {
         //  If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to\r
         // {DEST_DIR_DRBUG}/FlashMap.h\r
         //\r
-        if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {\r
+        if (saq.isHaveTianoR8FlashMap()) {\r
             fileBuffer.append(CommonDefinition.INCLUDE);\r
             fileBuffer.append("  <");\r
             fileBuffer.append(CommonDefinition.TIANOR8PLASHMAPH + ">\r\n");\r
@@ -427,7 +425,7 @@ public class AutoGen {
         // process <Externs> it should be set the DOC as the Native MSA info.\r
         //\r
         Map<String, XmlObject> doc = GlobalData.getNativeMsa(this.moduleId);\r
-        SurfaceAreaQuery.push(doc);\r
+        saq.push(doc);\r
         //\r
         // Write <Extern>\r
         // DriverBinding/ComponentName/DriverConfiguration/DriverDialog\r
@@ -445,24 +443,23 @@ public class AutoGen {
         //\r
         // Write EntryPoint to autgoGen.c\r
         //\r
-        String[] entryPointList = SurfaceAreaQuery.getModuleEntryPointArray();\r
-               String[] unloadImageList = SurfaceAreaQuery.getModuleUnloadImageArray();\r
+        String[] entryPointList = saq.getModuleEntryPointArray();\r
+               String[] unloadImageList = saq.getModuleUnloadImageArray();\r
         EntryPointToAutoGen(CommonDefinition.remDupString(entryPointList), \r
                                        CommonDefinition.remDupString(unloadImageList),\r
                                        fileBuffer);\r
 \r
-        pcdDriverType = SurfaceAreaQuery.getPcdDriverType();\r
+        pcdDriverType = saq.getPcdDriverType();\r
 \r
         //\r
         // Restore the DOC which include the FPD module info.\r
         //\r
-        SurfaceAreaQuery.pop();\r
+        saq.pop();\r
 \r
         //\r
         // Write Guid to autogen.c\r
         //\r
-        String guid = CommonDefinition.formatGuidName(SurfaceAreaQuery\r
-                                                      .getModuleGuid());\r
+        String guid = CommonDefinition.formatGuidName(saq.getModuleGuid());\r
 \r
         fileBuffer\r
         .append("GLOBAL_REMOVE_IF_UNREFERENCED EFI_GUID gEfiCallerIdGuid = {");\r
@@ -490,7 +487,7 @@ public class AutoGen {
         //\r
         // Get module dependent Package identification.\r
         //\r
-        PackageIdentification[] packages = SurfaceAreaQuery.getDependencePkg(this.arch);\r
+        PackageIdentification[] packages = saq.getDependencePkg(this.arch);\r
         for (int i = 0; i < packages.length; i++) {\r
             if (!this.mDepPkgList.contains(packages[i])) {\r
                 this.mDepPkgList.add(packages[i]);\r
@@ -572,7 +569,7 @@ public class AutoGen {
         // be get from module surface area instead of hard code.\r
         //\r
         fileBuffer.append(CommonDefinition.AUTOGENHBEGIN);\r
-        String[] specList = SurfaceAreaQuery.getExternSpecificaiton();\r
+        String[] specList = saq.getExternSpecificaiton();\r
         for (int i = 0; i < specList.length; i++) {\r
             fileBuffer.append(CommonDefinition.DEFINE + specList[i]\r
                               + "\r\n");\r
@@ -583,8 +580,8 @@ public class AutoGen {
         //\r
         // Write consumed package's mdouleInfo related *.h file to autogen.h.\r
         //\r
-        moduleType = SurfaceAreaQuery.getModuleType();\r
-        PackageIdentification[] cosumedPkglist = SurfaceAreaQuery\r
+        moduleType = saq.getModuleType();\r
+        PackageIdentification[] cosumedPkglist = saq\r
                                                  .getDependencePkg(this.arch);\r
         headerFileList = depPkgToAutogenH(cosumedPkglist, moduleType);\r
         item = headerFileList.iterator();\r
@@ -594,7 +591,7 @@ public class AutoGen {
         //\r
         // Write library class's related *.h file to autogen.h\r
         //\r
-        String[] libClassList = SurfaceAreaQuery\r
+        String[] libClassList = saq\r
                                 .getLibraryClasses(CommonDefinition.ALWAYSCONSUMED, this.arch);\r
         if (libClassList != null) {\r
             libClassIncludeH = LibraryClassToAutogenH(libClassList);\r
@@ -604,7 +601,7 @@ public class AutoGen {
             }\r
         }\r
 \r
-        libClassList = SurfaceAreaQuery\r
+        libClassList = saq\r
                        .getLibraryClasses(CommonDefinition.ALWAYSPRODUCED, this.arch);\r
         if (libClassList != null) {\r
             libClassIncludeH = LibraryClassToAutogenH(libClassList);\r
@@ -619,7 +616,7 @@ public class AutoGen {
         //  If is TianoR8FlashMap, copy {Fv_DIR}/FlashMap.h to\r
         // {DEST_DIR_DRBUG}/FlashMap.h\r
         //\r
-        if (SurfaceAreaQuery.isHaveTianoR8FlashMap()) {\r
+        if (saq.isHaveTianoR8FlashMap()) {\r
             fileBuffer.append(CommonDefinition.INCLUDE);\r
             fileBuffer.append("  <");\r
             fileBuffer.append(CommonDefinition.TIANOR8PLASHMAPH + ">\r\n");\r
@@ -672,7 +669,7 @@ public class AutoGen {
         this.myPcdAutogen = new PCDAutoGenAction(moduleId,\r
                                                  arch,\r
                                                  true,\r
-                                                 SurfaceAreaQuery.getModulePcdEntryNameArray(),\r
+                                                 saq.getModulePcdEntryNameArray(),\r
                                                  pcdDriverType);\r
         try {\r
             this.myPcdAutogen.execute();\r
@@ -713,7 +710,7 @@ public class AutoGen {
         //\r
         for (int i = 0; i < libClassList.length; i++) {\r
             includeName = GlobalData.getLibraryClassHeaderFiles(\r
-                                                                SurfaceAreaQuery.getDependencePkg(this.arch),\r
+                            saq.getDependencePkg(this.arch),\r
                                                                 libClassList[i]);\r
             if (includeName == null) {\r
                 throw new AutoGenException("Can not find library class ["\r
@@ -785,7 +782,7 @@ public class AutoGen {
     void EntryPointToAutoGen(String[] entryPointList, String[] unloadImageList, StringBuffer fileBuffer)\r
     throws BuildException {\r
 \r
-        String typeStr = SurfaceAreaQuery.getModuleType();\r
+        String typeStr = saq.getModuleType();\r
                int unloadImageCount = 0;\r
         int entryPointCount  = 0;\r
 \r
@@ -1250,12 +1247,12 @@ public class AutoGen {
         // then add those PPI ,and PPI Notify name to list.\r
         //\r
 \r
-        String[] ppiList = SurfaceAreaQuery.getPpiArray(this.arch);\r
+        String[] ppiList = saq.getPpiArray(this.arch);\r
         for (int i = 0; i < ppiList.length; i++) {\r
             this.mPpiList.add(ppiList[i]);\r
         }\r
 \r
-        String[] ppiNotifyList = SurfaceAreaQuery.getPpiNotifyArray(this.arch);\r
+        String[] ppiNotifyList = saq.getPpiNotifyArray(this.arch);\r
         for (int i = 0; i < ppiNotifyList.length; i++) {\r
             this.mPpiList.add(ppiNotifyList[i]);\r
         }\r
@@ -1299,7 +1296,7 @@ public class AutoGen {
     void ProtocolGuidToAutogenC(StringBuffer fileBuffer) throws BuildException {\r
         String[] cNameGuid = null;\r
 \r
-        String[] protocolList = SurfaceAreaQuery.getProtocolArray(this.arch);\r
+        String[] protocolList = saq.getProtocolArray(this.arch);\r
 \r
         //\r
         // Add result to Autogen global list.\r
@@ -1308,7 +1305,7 @@ public class AutoGen {
             this.mProtocolList.add(protocolList[i]);\r
         }\r
 \r
-        String[] protocolNotifyList = SurfaceAreaQuery\r
+        String[] protocolNotifyList = saq\r
                                       .getProtocolNotifyArray(this.arch);\r
 \r
         for (int i = 0; i < protocolNotifyList.length; i++) {\r
@@ -1356,7 +1353,7 @@ public class AutoGen {
         String[] cNameGuid = null;\r
         String guidKeyWord = null;\r
 \r
-        String[] guidList = SurfaceAreaQuery.getGuidEntryArray(this.arch);\r
+        String[] guidList = saq.getGuidEntryArray(this.arch);\r
 \r
         for (int i = 0; i < guidList.length; i++) {\r
             this.mGuidList.add(guidList[i]);\r
@@ -1673,7 +1670,7 @@ public class AutoGen {
         // 3.DRIVER_CONFIGURATION 4. DRIVER_DIAGNOSTIC\r
         //\r
 \r
-        String[] drvBindList = SurfaceAreaQuery.getDriverBindingArray();\r
+        String[] drvBindList = saq.getDriverBindingArray();\r
 \r
         //\r
         // If component name protocol,component configuration protocol,\r
@@ -1684,9 +1681,9 @@ public class AutoGen {
             return;\r
         }\r
 \r
-        String[] compNamList = SurfaceAreaQuery.getComponentNameArray();\r
-        String[] compConfList = SurfaceAreaQuery.getDriverConfigArray();\r
-        String[] compDiagList = SurfaceAreaQuery.getDriverDiagArray();\r
+        String[] compNamList = saq.getComponentNameArray();\r
+        String[] compConfList = saq.getDriverConfigArray();\r
+        String[] compDiagList = saq.getDriverDiagArray();\r
 \r
         int BitMask = 0;\r
 \r
@@ -1826,8 +1823,8 @@ public class AutoGen {
         // <ExitBootServiceCallBack> and add to setVirtualAddList\r
         //  exitBootServiceList.\r
         //\r
-        String[] setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();\r
-        String[] exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();\r
+        String[] setVirtuals = saq.getSetVirtualAddressMapCallBackArray();\r
+        String[] exitBoots = saq.getExitBootServicesCallBackArray();\r
         if (setVirtuals != null) {\r
             for (int j = 0; j < setVirtuals.length; j++) {\r
                 this.setVirtalAddList.add(setVirtuals[j]);\r
@@ -1915,8 +1912,7 @@ public class AutoGen {
         String[] setVirtuals = null;\r
         String[] exitBoots = null;\r
 \r
-        ModuleIdentification[] libraryIdList = SurfaceAreaQuery\r
-                                               .getLibraryInstance(this.arch);\r
+        ModuleIdentification[] libraryIdList = saq.getLibraryInstance(this.arch);\r
         try {\r
             if (libraryIdList != null) {\r
                 //\r
@@ -1943,21 +1939,17 @@ public class AutoGen {
                         //\r
 \r
                         Map<String, XmlObject> libDoc = GlobalData.getDoc(libInstanceId, this.arch);\r
-                        SurfaceAreaQuery.push(libDoc);\r
+                        saq.push(libDoc);\r
                         //\r
                         // Get <PPis>, <Protocols>, <Guids> list of this library\r
                         // instance.\r
                         //\r
-                        String[] ppiList = SurfaceAreaQuery.getPpiArray(this.arch);\r
-                        String[] ppiNotifyList = SurfaceAreaQuery\r
-                                                 .getPpiNotifyArray(this.arch);\r
-                        String[] protocolList = SurfaceAreaQuery\r
-                                                .getProtocolArray(this.arch);\r
-                        String[] protocolNotifyList = SurfaceAreaQuery\r
-                                                      .getProtocolNotifyArray(this.arch);\r
-                        String[] guidList = SurfaceAreaQuery\r
-                                            .getGuidEntryArray(this.arch);\r
-                        PackageIdentification[] pkgList = SurfaceAreaQuery.getDependencePkg(this.arch);\r
+                        String[] ppiList = saq.getPpiArray(this.arch);\r
+                        String[] ppiNotifyList = saq.getPpiNotifyArray(this.arch);\r
+                        String[] protocolList = saq.getProtocolArray(this.arch);\r
+                        String[] protocolNotifyList = saq.getProtocolNotifyArray(this.arch);\r
+                        String[] guidList = saq.getGuidEntryArray(this.arch);\r
+                        PackageIdentification[] pkgList = saq.getDependencePkg(this.arch);\r
 \r
                         //\r
                         // Add those ppi, protocol, guid in global ppi,\r
@@ -1993,17 +1985,15 @@ public class AutoGen {
                         // If not yet parse this library instance's constructor\r
                         // element,parse it.\r
                         //\r
-                        libConstructName = SurfaceAreaQuery\r
-                                           .getLibConstructorName();\r
-                        libDestructName = SurfaceAreaQuery\r
-                                          .getLibDestructorName();\r
+                        libConstructName = saq.getLibConstructorName();\r
+                        libDestructName = saq.getLibDestructorName();\r
 \r
                         //\r
                         // Collect SetVirtualAddressMapCallBack and\r
                         // ExitBootServiceCallBack.\r
                         //\r
-                        setVirtuals = SurfaceAreaQuery.getSetVirtualAddressMapCallBackArray();\r
-                        exitBoots = SurfaceAreaQuery.getExitBootServicesCallBackArray();\r
+                        setVirtuals = saq.getSetVirtualAddressMapCallBackArray();\r
+                        exitBoots = saq.getExitBootServicesCallBackArray();\r
                         if (setVirtuals != null) {\r
                             for (int j = 0; j < setVirtuals.length; j++) {\r
                                 this.setVirtalAddList.add(setVirtuals[j]);\r
@@ -2014,7 +2004,7 @@ public class AutoGen {
                                 this.exitBootServiceList.add(exitBoots[k]);\r
                             }\r
                         }\r
-                        SurfaceAreaQuery.pop();\r
+                        saq.pop();\r
                         //\r
                         // Add dependent library instance constructor function.\r
                         //\r
index 9fb7a43ce9bde3eb77e1b0431a3e34e8d36a5843..28e2a296f156bd91fedfa705aee12aec2f8fc5c8 100644 (file)
@@ -65,16 +65,15 @@ public class AutogenLibOrder {
             // Add libraryInstance in to libInstanceList.\r
             // \r
             Map<String, XmlObject> libDoc = GlobalData.getDoc(libraryList[i], arch);\r
-            SurfaceAreaQuery.push(libDoc);\r
-            libInstanceNode = new LibraryInstanceNode (libraryList[i],SurfaceAreaQuery.getLibConstructorName(), SurfaceAreaQuery.getLibDestructorName());\r
+            SurfaceAreaQuery saq = new SurfaceAreaQuery(libDoc);\r
+            libInstanceNode = new LibraryInstanceNode (libraryList[i],saq.getLibConstructorName(), saq.getLibDestructorName());\r
             libInstanceList.add(libInstanceNode);\r
             \r
             //\r
             // Add library instance and consumed library class list to\r
             // libInstanceMap.\r
             //\r
-            libClassConsmList = SurfaceAreaQuery\r
-                    .getLibraryClasses(CommonDefinition.ALWAYSCONSUMED, arch);\r
+            libClassConsmList = saq.getLibraryClasses(CommonDefinition.ALWAYSCONSUMED, arch);\r
             if (libClassConsmList != null) {\r
                 String[] classStr = new String[libClassConsmList.length];\r
                 for (int k = 0; k < libClassConsmList.length; k++) {\r
@@ -92,8 +91,7 @@ public class AutogenLibOrder {
             //\r
             // Add library class and library instance map.\r
             //\r
-            libClassDeclList = SurfaceAreaQuery\r
-                    .getLibraryClasses(CommonDefinition.ALWAYSPRODUCED, arch);\r
+            libClassDeclList = saq.getLibraryClasses(CommonDefinition.ALWAYSPRODUCED, arch);\r
             if (libClassDeclList != null) {\r
                 for (int j = 0; j < libClassDeclList.length; j++) {\r
                     if (this.libClassMap.containsKey(libClassDeclList[j])) {\r
@@ -107,7 +105,6 @@ public class AutogenLibOrder {
                     }\r
                 }\r
             }\r
-            SurfaceAreaQuery.pop();\r
         }\r
 \r
         //\r
index 488451554796b4854da61b7ce8fa988cc1f311ea..ba6f2cdab0d2fd2d12ee18e678850e3412e66582 100644 (file)
@@ -96,6 +96,8 @@ public class FpdParserTask extends Task {
     ///\r
     private Vector<Property> properties = new Vector<Property>();\r
 \r
+    SurfaceAreaQuery saq = null;\r
+    \r
     private boolean isUnified = true;\r
 \r
     /**\r
@@ -169,7 +171,7 @@ public class FpdParserTask extends Task {
         //\r
         // Gen build.xml\r
         //\r
-        PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, fvs, isUnified);\r
+        PlatformBuildFileGenerator fileGenerator = new PlatformBuildFileGenerator(getProject(), outfiles, fvs, isUnified, saq);\r
         fileGenerator.genBuildFile();\r
 \r
         //\r
@@ -194,12 +196,12 @@ public class FpdParserTask extends Task {
                   File write FV.inf files error.\r
     **/\r
     private void genFvInfFiles(String ffsCommonDir) throws BuildException {\r
-        String[] validFv = SurfaceAreaQuery.getFpdValidImageNames();\r
+        String[] validFv = saq.getFpdValidImageNames();\r
         for (int i = 0; i < validFv.length; i++) {\r
             //\r
             // Get all global variables from FPD and set them to properties\r
             //\r
-            String[][] globalVariables = SurfaceAreaQuery.getFpdGlobalVariable();\r
+            String[][] globalVariables = saq.getFpdGlobalVariable();\r
             for (int j = 0; j < globalVariables.length; j++) {\r
                 getProject().setProperty(globalVariables[j][0], globalVariables[j][1]);\r
             }\r
@@ -216,7 +218,7 @@ public class FpdParserTask extends Task {
                 //\r
                 // Options\r
                 //\r
-                String[][] options = SurfaceAreaQuery.getFpdOptions(validFv[i]);\r
+                String[][] options = saq.getFpdOptions(validFv[i]);\r
                 if (options.length > 0) {\r
                     bw.write("[options]");\r
                     bw.newLine();\r
@@ -237,7 +239,7 @@ public class FpdParserTask extends Task {
                 //\r
                 // Attributes;\r
                 //\r
-                String[][] attributes = SurfaceAreaQuery.getFpdAttributes(validFv[i]);\r
+                String[][] attributes = saq.getFpdAttributes(validFv[i]);\r
                 if (attributes.length > 0) {\r
                     bw.write("[attributes]");\r
                     bw.newLine();\r
@@ -258,7 +260,7 @@ public class FpdParserTask extends Task {
                 //\r
                 // Components\r
                 //\r
-                String[][] components = SurfaceAreaQuery.getFpdComponents(validFv[i]);\r
+                String[][] components = saq.getFpdComponents(validFv[i]);\r
                 if (components.length > 0) {\r
                     bw.write("[components]");\r
                     bw.newLine();\r
@@ -325,12 +327,12 @@ public class FpdParserTask extends Task {
 \r
             Map<String, XmlObject> map = new HashMap<String, XmlObject>();\r
             map.put("PlatformSurfaceArea", doc);\r
-            SurfaceAreaQuery.setDoc(map);\r
+            saq = new SurfaceAreaQuery(map);\r
 \r
             //\r
             // Initialize\r
             //\r
-            platformId = SurfaceAreaQuery.getFpdHeader();\r
+            platformId = saq.getFpdHeader();\r
             platformId.setFpdFile(fpdFile);\r
             getProject().setProperty("PLATFORM", platformId.getName());\r
             getProject().setProperty("PLATFORM_FILE", platformId.getRelativeFpdFile().replaceAll("(\\\\)", "/"));\r
@@ -340,17 +342,17 @@ public class FpdParserTask extends Task {
             //\r
             // Build mode. User-defined output dir.\r
             //\r
-            String buildMode = SurfaceAreaQuery.getFpdIntermediateDirectories();\r
-            String userDefinedOutputDir = SurfaceAreaQuery.getFpdOutputDirectory();\r
+            String buildMode = saq.getFpdIntermediateDirectories();\r
+            String userDefinedOutputDir = saq.getFpdOutputDirectory();\r
 \r
             OutputManager.getInstance().setup(userDefinedOutputDir, buildMode);\r
 \r
             //\r
             // TBD. Deal PCD and BuildOption related Info\r
             //\r
-            GlobalData.setFpdBuildOptions(SurfaceAreaQuery.getFpdBuildOptions());\r
+            GlobalData.setFpdBuildOptions(saq.getFpdBuildOptions());\r
 \r
-            GlobalData.setToolChainPlatformInfo(SurfaceAreaQuery.getFpdToolChainInfo());\r
+            GlobalData.setToolChainPlatformInfo(saq.getFpdToolChainInfo());\r
 \r
             //\r
             // Parse all list modules SA\r
@@ -363,7 +365,7 @@ public class FpdParserTask extends Task {
             parseToolChainFamilyOptions();\r
             parseToolChainOptions();\r
 \r
-            SurfaceAreaQuery.setDoc(map);\r
+            saq.push(map);\r
 \r
             //\r
             // Pcd Collection. Call CollectPCDAction to collect pcd info.\r
@@ -379,7 +381,7 @@ public class FpdParserTask extends Task {
       Parse all modules listed in FPD file.\r
     **/\r
     private void parseModuleSAFiles() throws EdkException{\r
-        Map<FpdModuleIdentification, Map<String, XmlObject>> moduleSAs = SurfaceAreaQuery.getFpdModules();\r
+        Map<FpdModuleIdentification, Map<String, XmlObject>> moduleSAs = saq.getFpdModules();\r
 \r
         //\r
         // For every Module lists in FPD file.\r
@@ -397,8 +399,8 @@ public class FpdParserTask extends Task {
             //\r
             // Put fpdModuleId to the corresponding FV\r
             //\r
-            SurfaceAreaQuery.push(GlobalData.getDoc(fpdModuleId));\r
-            String fvBinding = SurfaceAreaQuery.getModuleFvBindingKeyword();\r
+            saq.push(GlobalData.getDoc(fpdModuleId));\r
+            String fvBinding = saq.getModuleFvBindingKeyword();\r
 \r
             fpdModuleId.setFvBinding(fvBinding);\r
             updateFvs(fvBinding, fpdModuleId);\r
@@ -408,7 +410,7 @@ public class FpdParserTask extends Task {
             //\r
             ModuleIdentification moduleId = fpdModuleId.getModule();\r
 \r
-            String baseName = SurfaceAreaQuery.getModuleOutputFileBasename();\r
+            String baseName = saq.getModuleOutputFileBasename();\r
             \r
             if (baseName == null) {\r
                 baseName = moduleId.getName();\r
@@ -422,12 +424,12 @@ public class FpdParserTask extends Task {
             //\r
             GlobalData.addModuleToolChainOption(fpdModuleId, parseModuleBuildOptions(false));\r
             GlobalData.addModuleToolChainFamilyOption(fpdModuleId, parseModuleBuildOptions(true));\r
-            SurfaceAreaQuery.pop();\r
+            saq.pop();\r
         }\r
     }\r
 \r
     private ToolChainMap parseModuleBuildOptions(boolean toolChainFamilyFlag) throws EdkException {\r
-        String[][] options = SurfaceAreaQuery.getModuleBuildOptions(toolChainFamilyFlag);\r
+        String[][] options = saq.getModuleBuildOptions(toolChainFamilyFlag);\r
         if (options == null || options.length == 0) {\r
             return new ToolChainMap();\r
         }\r
@@ -435,7 +437,7 @@ public class FpdParserTask extends Task {
     }\r
 \r
     private ToolChainMap parsePlatformBuildOptions(boolean toolChainFamilyFlag) throws EdkException {\r
-        String[][] options = SurfaceAreaQuery.getPlatformBuildOptions(toolChainFamilyFlag);\r
+        String[][] options = saq.getPlatformBuildOptions(toolChainFamilyFlag);\r
         if (options == null || options.length == 0) {\r
             return new ToolChainMap();\r
         }\r
index dd812d8e8ababd70067f65d43a384d515326bc45..017c4e378c8dabd306c38c01b98638b942067589 100644 (file)
@@ -62,6 +62,8 @@ public class PlatformBuildFileGenerator {
 \r
     private boolean isUnified = true;\r
     \r
+    private SurfaceAreaQuery saq = null;\r
+    \r
     private Project project;\r
     \r
     private String info = "DO NOT EDIT \n" \r
@@ -70,11 +72,12 @@ public class PlatformBuildFileGenerator {
         + "Abstract:\n"\r
         + "Auto-generated ANT build file for building EFI Modules and Platforms\n";\r
 \r
-    public PlatformBuildFileGenerator(Project project, Map<FpdModuleIdentification, String> outfiles, Map<String, Set<FpdModuleIdentification>> fvs, boolean isUnified){\r
+    public PlatformBuildFileGenerator(Project project, Map<FpdModuleIdentification, String> outfiles, Map<String, Set<FpdModuleIdentification>> fvs, boolean isUnified, SurfaceAreaQuery saq){\r
         this.project = project;\r
         this.outfiles = outfiles;\r
         this.isUnified = isUnified;\r
         this.fvs = fvs;\r
+        this.saq = saq;\r
         this.platformName = project.getProperty("PLATFORM");\r
     }\r
     \r
@@ -197,7 +200,7 @@ public class PlatformBuildFileGenerator {
         //\r
         // Get all valid FV name\r
         //\r
-        String[] validFv = SurfaceAreaQuery.getFpdValidImageNames();\r
+        String[] validFv = saq.getFpdValidImageNames();\r
         \r
         //\r
         // For each valid FV, get all modules in sequence\r
@@ -312,7 +315,7 @@ public class PlatformBuildFileGenerator {
                 String fvOutputDir = project.getProperty("BUILD_DIR") + File.separatorChar \r
                                         + targetList[i] + "_" \r
                                         + toolchainList[j] + File.separatorChar + "FV";\r
-                String[] validFv = SurfaceAreaQuery.getFpdValidImageNames();\r
+                String[] validFv = saq.getFpdValidImageNames();\r
                 for (int k = 0; k < validFv.length; k++) {\r
                     String inputFile = fvOutputDir + "" + File.separatorChar + validFv[k].toUpperCase() + ".inf";\r
                     Element fvEle = document.createElement("genfvimage");\r
@@ -507,7 +510,7 @@ public class PlatformBuildFileGenerator {
         Element ele = document.createElement("target");\r
         ele.setAttribute("name", "prebuild");\r
         \r
-        Node node = SurfaceAreaQuery.getFpdUserExtensionPreBuild();\r
+        Node node = saq.getFpdUserExtensionPreBuild();\r
         if (node != null) {\r
             //\r
             // For every Target and ToolChain\r
@@ -551,7 +554,7 @@ public class PlatformBuildFileGenerator {
         Element ele = document.createElement("target");\r
         ele.setAttribute("name", "postbuild");\r
         \r
-        Node node = SurfaceAreaQuery.getFpdUserExtensionPostBuild();\r
+        Node node = saq.getFpdUserExtensionPostBuild();\r
         if (node != null) {\r
             //\r
             // For every Target and ToolChain\r
index 74a2d4fe435987ffe6758d044d583e32068b8e44..7e1e2c68523d31f9e0b2f94c340473a6aa42329e 100644 (file)
@@ -185,7 +185,7 @@ public class GlobalData {
                 List<DbPathAndFilename> packages = db.getFrameworkDatabase().getPackageList().getFilenameList();\r
                 Iterator<DbPathAndFilename> iter = packages.iterator();\r
                 while (iter.hasNext()) {\r
-                    String fileName = iter.next().getStringValue();\r
+                    String fileName = iter.next().getStringValue().trim();\r
                     Spd spd = new Spd(new File(workspaceDir + File.separatorChar + fileName));\r
                     packageList.add(spd.getPackageId());\r
                     spdTable.put(spd.getPackageId(), spd);\r
@@ -199,7 +199,7 @@ public class GlobalData {
                 List<DbPathAndFilename> platforms = db.getFrameworkDatabase().getPlatformList().getFilenameList();\r
                 Iterator<DbPathAndFilename> iter = platforms.iterator();\r
                 while (iter.hasNext()) {\r
-                    String fileName = iter.next().getStringValue();\r
+                    String fileName = iter.next().getStringValue().trim();\r
                     File fpdFile = new File(workspaceDir + File.separatorChar + fileName);\r
                     if ( !fpdFile.exists() ) {\r
                         throw new BuildException("Platform file [" + fpdFile.getPath() + "] not exists. ");\r
@@ -219,8 +219,8 @@ public class GlobalData {
                     //\r
                     Map<String, XmlObject> fpdDocMap = new HashMap<String, XmlObject>();\r
                     fpdDocMap.put("PlatformSurfaceArea", fpdDoc);\r
-                    SurfaceAreaQuery.setDoc(fpdDocMap);\r
-                    PlatformIdentification platformId = SurfaceAreaQuery.getFpdHeader();\r
+                    SurfaceAreaQuery saq = new SurfaceAreaQuery(fpdDocMap);\r
+                    PlatformIdentification platformId = saq.getFpdHeader();\r
                     platformId.setFpdFile(fpdFile);\r
                     platformList.add(platformId);\r
                 }\r
index 63568b38861ed8fefca4dc8526f530d877ca618e..cfb5dc1f875e2dc7c18f89fb9b62ba29e8dc4bc8 100644 (file)
@@ -106,24 +106,24 @@ public class Spd {
             // We can change Map to XmlObject\r
             Map<String, XmlObject> spdDocMap = new HashMap<String, XmlObject>();\r
             spdDocMap.put("PackageSurfaceArea", spdDoc);\r
-            SurfaceAreaQuery.setDoc(spdDocMap);\r
+            SurfaceAreaQuery saq = new SurfaceAreaQuery(spdDocMap);\r
             //\r
             //\r
             //\r
-            packageId = SurfaceAreaQuery.getSpdHeader();\r
+            packageId = saq.getSpdHeader();\r
             packageId.setSpdFile(packageFile);\r
             \r
             //\r
             // initialize Msa Files\r
             // MSA file is absolute file path\r
             //\r
-            String[] msaFilenames = SurfaceAreaQuery.getSpdMsaFile();\r
+            String[] msaFilenames = saq.getSpdMsaFile();\r
             for (int i = 0; i < msaFilenames.length; i++){\r
                 File msaFile = new File(packageId.getPackageDir() + File.separatorChar + msaFilenames[i]);\r
                 Map<String, XmlObject> msaDoc = GlobalData.getNativeMsa( msaFile );\r
-                SurfaceAreaQuery.push(msaDoc);\r
-                ModuleIdentification moduleId = SurfaceAreaQuery.getMsaHeader();\r
-                SurfaceAreaQuery.pop();\r
+                saq.push(msaDoc);\r
+                ModuleIdentification moduleId = saq.getMsaHeader();\r
+                saq.pop();\r
                 moduleId.setPackage(packageId);\r
                 moduleId.setMsaFile(msaFile);\r
                 if (msaInfo.containsKey(moduleId)) {\r
@@ -135,7 +135,7 @@ public class Spd {
             //\r
             // initialize Package header files\r
             //\r
-            Map<String, String> packageHeaders = SurfaceAreaQuery.getSpdPackageHeaderFiles();\r
+            Map<String, String> packageHeaders = saq.getSpdPackageHeaderFiles();\r
             Set keys = packageHeaders.keySet();\r
             Iterator iter = keys.iterator();\r
             while (iter.hasNext()){\r
@@ -153,7 +153,7 @@ public class Spd {
             //\r
             // initialize Guid Info\r
             //\r
-            guidInfo.putAll(SurfaceAreaQuery.getSpdGuid());\r
+            guidInfo.putAll(saq.getSpdGuid());\r
             \r
             //\r
             // For Pcd get TokenSpaceGuid\r
@@ -169,17 +169,17 @@ public class Spd {
             //\r
             // initialize PPI info\r
             //\r
-            ppiInfo.putAll(SurfaceAreaQuery.getSpdPpi());\r
+            ppiInfo.putAll(saq.getSpdPpi());\r
             \r
             //\r
             // initialize Protocol info\r
             //\r
-            protocolInfo.putAll(SurfaceAreaQuery.getSpdProtocol());\r
+            protocolInfo.putAll(saq.getSpdProtocol());\r
             \r
             //\r
             // initialize library class declaration\r
             //\r
-            Map<String, String[]> libraryClassHeaders = SurfaceAreaQuery.getSpdLibraryClasses();\r
+            Map<String, String[]> libraryClassHeaders = saq.getSpdLibraryClasses();\r
             keys = libraryClassHeaders.keySet();\r
             iter = keys.iterator();\r
             while (iter.hasNext()){\r
index 4e2a0704c0d37a3a262f5cb3198e20d81deafc1e..3eb024463ab84b54806722647ea0b8388f741ee1 100644 (file)
@@ -80,36 +80,36 @@ import org.tianocore.build.autogen.CommonDefinition;
  */\r
 public class SurfaceAreaQuery {\r
 \r
-    public static String prefix = "http://www.TianoCore.org/2006/Edk2.0";\r
+    public String prefix = "http://www.TianoCore.org/2006/Edk2.0";\r
 \r
     //\r
     // Contains name/value pairs of Surface Area document object. The name is\r
     // always the top level element name.\r
     //\r
-    private static Map<String, XmlObject> map = null;\r
+    private Map<String, XmlObject> map = null;\r
 \r
     //\r
     // mapStack is used to do nested query\r
     //\r
-    private static Stack<Map<String, XmlObject>> mapStack = new Stack<Map<String, XmlObject>>();\r
+    private Stack<Map<String, XmlObject>> mapStack = new Stack<Map<String, XmlObject>>();\r
 \r
     //\r
     // prefix of name space\r
     //\r
-    private static String nsPrefix = "sans";\r
+    private String nsPrefix = "sans";\r
 \r
     //\r
     // xmlbeans needs a name space for each Xpath element\r
     //\r
-    private static String ns = null;\r
+    private String ns = null;\r
 \r
     //\r
     // keep the namep declaration for xmlbeans Xpath query\r
     //\r
-    private static String queryDeclaration = null;\r
+    private String queryDeclaration = null;\r
 \r
-    private static StringBuffer normQueryString = new StringBuffer(4096);\r
-    private static Pattern xPathPattern = Pattern.compile("([^/]*)(/|//)([^/]+)");\r
+    private StringBuffer normQueryString = new StringBuffer(4096);\r
+    private Pattern xPathPattern = Pattern.compile("([^/]*)(/|//)([^/]+)");\r
 \r
     /**\r
      * Set a Surface Area document for query later\r
@@ -118,10 +118,10 @@ public class SurfaceAreaQuery {
      *            A Surface Area document in TopLevelElementName/XmlObject\r
      *            format.\r
      */\r
-    public static void setDoc(Map<String, XmlObject> map) {\r
+    public SurfaceAreaQuery(Map<String, XmlObject> map) {\r
         ns = prefix;\r
         queryDeclaration = "declare namespace " + nsPrefix + "='" + ns + "'; ";\r
-        SurfaceAreaQuery.map = map;\r
+        this.map = map;\r
     }\r
 \r
     /**\r
@@ -133,17 +133,17 @@ public class SurfaceAreaQuery {
      *            The TopLevelElementName/XmlObject format of a Surface Area\r
      *            document.\r
      */\r
-    public static void push(Map<String, XmlObject> newMap) {\r
-        mapStack.push(SurfaceAreaQuery.map);\r
-        SurfaceAreaQuery.map = newMap;\r
+    public void push(Map<String, XmlObject> newMap) {\r
+        mapStack.push(this.map);\r
+        this.map = newMap;\r
     }\r
 \r
     /**\r
      * Discard current used Surface Area document and use the top document in\r
      * stack instead.\r
      */\r
-    public static void pop() {\r
-        SurfaceAreaQuery.map = mapStack.pop();\r
+    public void pop() {\r
+        this.map = mapStack.pop();\r
     }\r
 \r
     // /\r
@@ -152,7 +152,7 @@ public class SurfaceAreaQuery {
     // / selectPath(). For example, converting /MsaHeader/ModuleType to\r
     // / /ns:MsaHeader/ns:ModuleType\r
     // /\r
-    private static String normalizeQueryString(String[] exp, String from) {\r
+    private String normalizeQueryString(String[] exp, String from) {\r
         normQueryString.setLength(0);\r
 \r
         int i = 0;\r
@@ -194,7 +194,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns NULL if nothing is at the specified xpath\r
      */\r
-    public static Object[] get(String[] xPath) {\r
+    public Object[] get(String[] xPath) {\r
         if (map == null) {\r
             return null;\r
         }\r
@@ -234,7 +234,7 @@ public class SurfaceAreaQuery {
      * @returns An array of XmlObject if elements are found at the given xpath\r
      * @returns NULL if nothing is found at the given xpath\r
      */\r
-    public static Object[] get(String rootName, String[] xPath) {\r
+    public Object[] get(String rootName, String[] xPath) {\r
         if (map == null) {\r
             return null;\r
         }\r
@@ -269,7 +269,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns NULL if nothing is found at the known xpath\r
      */\r
-    public static String[][] getSourceFiles(String arch) {\r
+    public String[][] getSourceFiles(String arch) {\r
         String[] xPath;\r
         Object[] returns;\r
 \r
@@ -304,7 +304,7 @@ public class SurfaceAreaQuery {
      * @returns Directory names array if elements are found at the known xpath\r
      * @returns Empty if nothing is found at the known xpath\r
      */\r
-    public static String getFpdOutputDirectory() {\r
+    public String getFpdOutputDirectory() {\r
         String[] xPath = new String[] { "/PlatformDefinitions" };\r
 \r
         Object[] returns = get("PlatformSurfaceArea", xPath);\r
@@ -315,7 +315,7 @@ public class SurfaceAreaQuery {
         return item.getOutputDirectory();\r
     }\r
 \r
-    public static String getFpdIntermediateDirectories() {\r
+    public String getFpdIntermediateDirectories() {\r
         String[] xPath = new String[] { "/PlatformDefinitions" };\r
 \r
         Object[] returns = get("PlatformSurfaceArea", xPath);\r
@@ -331,7 +331,7 @@ public class SurfaceAreaQuery {
         }\r
     }\r
 \r
-    public static String getModuleFfsKeyword() {\r
+    public String getModuleFfsKeyword() {\r
         String[] xPath = new String[] { "/" };\r
 \r
         Object[] returns = get("ModuleSaBuildOptions", xPath);\r
@@ -342,7 +342,7 @@ public class SurfaceAreaQuery {
         return item.getFfsFormatKey();\r
     }\r
 \r
-    public static String getModuleFvBindingKeyword() {\r
+    public String getModuleFvBindingKeyword() {\r
         String[] xPath = new String[] { "/" };\r
 \r
         Object[] returns = get("ModuleSaBuildOptions", xPath);\r
@@ -353,7 +353,7 @@ public class SurfaceAreaQuery {
         return item.getFvBinding();\r
     }\r
 \r
-    public static List getModuleSupportedArchs() {\r
+    public List getModuleSupportedArchs() {\r
         String[] xPath = new String[] { "/" };\r
 \r
         Object[] returns = get("ModuleDefinitions", xPath);\r
@@ -364,7 +364,7 @@ public class SurfaceAreaQuery {
         return item.getSupportedArchitectures();\r
     }\r
 \r
-    public static BuildOptionsDocument.BuildOptions.Ffs[] getFpdFfs() {\r
+    public BuildOptionsDocument.BuildOptions.Ffs[] getFpdFfs() {\r
         String[] xPath = new String[] {"/Ffs"};\r
 \r
         Object[] returns = get("BuildOptions", xPath);\r
@@ -374,7 +374,7 @@ public class SurfaceAreaQuery {
         return (BuildOptionsDocument.BuildOptions.Ffs[])returns;\r
     }\r
 \r
-    public static String getModuleOutputFileBasename() {\r
+    public String getModuleOutputFileBasename() {\r
         String[] xPath = new String[] { "/" };\r
 \r
         Object[] returns = get("ModuleDefinitions", xPath);\r
@@ -398,7 +398,7 @@ public class SurfaceAreaQuery {
      *\r
      * @returns Empty array if nothing is there\r
      */\r
-    public static String[][] getOptions(String from, String[] xPath, boolean toolChainFamilyFlag) {\r
+    public String[][] getOptions(String from, String[] xPath, boolean toolChainFamilyFlag) {\r
         String target = null;\r
         String toolchain = null;\r
         String toolchainFamily = null;\r
@@ -482,7 +482,7 @@ public class SurfaceAreaQuery {
         return result;\r
     }\r
 \r
-    public static String[][] getModuleBuildOptions(boolean toolChainFamilyFlag) {\r
+    public String[][] getModuleBuildOptions(boolean toolChainFamilyFlag) {\r
         String[] xPath;\r
 \r
         if (toolChainFamilyFlag == true) {\r
@@ -497,7 +497,7 @@ public class SurfaceAreaQuery {
         return getOptions("ModuleSaBuildOptions", xPath, toolChainFamilyFlag);\r
     }\r
 \r
-    public static String[][] getPlatformBuildOptions(boolean toolChainFamilyFlag) {\r
+    public String[][] getPlatformBuildOptions(boolean toolChainFamilyFlag) {\r
         String[] xPath;\r
 \r
         if (toolChainFamilyFlag == true) {\r
@@ -513,7 +513,7 @@ public class SurfaceAreaQuery {
         return getOptions("PlatformSurfaceArea", xPath, toolChainFamilyFlag);\r
     }\r
 \r
-    public static ToolChainInfo getFpdToolChainInfo() {\r
+    public ToolChainInfo getFpdToolChainInfo() {\r
         String[] xPath = new String[] { "/PlatformDefinitions" };\r
 \r
         Object[] returns = get("PlatformSurfaceArea", xPath);\r
@@ -535,7 +535,7 @@ public class SurfaceAreaQuery {
      * @returns The module type name if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String getModuleType() {\r
+    public String getModuleType() {\r
         String[] xPath = new String[] { "/ModuleType" };\r
 \r
         Object[] returns = get(xPath);\r
@@ -556,7 +556,7 @@ public class SurfaceAreaQuery {
      * @returns package name list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static PackageIdentification[] getDependencePkg(String arch) {\r
+    public PackageIdentification[] getDependencePkg(String arch) {\r
         String[] xPath;\r
         String packageGuid = null;\r
         String packageVersion = null;\r
@@ -604,7 +604,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getLibraryClasses(String usage, String arch) {\r
+    public String[] getLibraryClasses(String usage, String arch) {\r
         String[] xPath;\r
         if (usage == null || usage.equals("")) {\r
             xPath = new String[] { "/LibraryClass" };\r
@@ -639,7 +639,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getModuleEntryPointArray() {\r
+    public String[] getModuleEntryPointArray() {\r
         String[] xPath = new String[] { "/Extern/ModuleEntryPoint" };\r
 \r
         Object[] returns = get("Externs", xPath);\r
@@ -666,7 +666,7 @@ public class SurfaceAreaQuery {
      * @returns Protocol String list if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getProtocolArray(String arch, String usage) {\r
+    public String[] getProtocolArray(String arch, String usage) {\r
         String[] xPath;\r
         String usageXpath = "";\r
         String archXpath = "";\r
@@ -706,7 +706,7 @@ public class SurfaceAreaQuery {
      * @returns Protocol String list if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getProtocolArray(String arch) {\r
+    public String[] getProtocolArray(String arch) {\r
         String[] xPath;\r
 \r
         if (arch == null || arch.equals("")) {\r
@@ -745,7 +745,7 @@ public class SurfaceAreaQuery {
      * @returns String[] if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getProtocolNotifyArray(String arch) {\r
+    public String[] getProtocolNotifyArray(String arch) {\r
         String[] xPath;\r
 \r
         if (arch == null || arch.equals("")) {\r
@@ -784,7 +784,7 @@ public class SurfaceAreaQuery {
      * @returns String[] if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getProtocolNotifyArray(String arch, String usage) {\r
+    public String[] getProtocolNotifyArray(String arch, String usage) {\r
 \r
         String[] xPath;\r
         String usageXpath;\r
@@ -822,7 +822,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getModuleUnloadImageArray() {\r
+    public String[] getModuleUnloadImageArray() {\r
         String[] xPath = new String[] { "/Extern/ModuleUnloadImage" };\r
 \r
         Object[] returns = get("Externs", xPath);\r
@@ -846,7 +846,7 @@ public class SurfaceAreaQuery {
      * @returns Extern objects list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static ExternsDocument.Externs.Extern[] getExternArray() {\r
+    public ExternsDocument.Externs.Extern[] getExternArray() {\r
         String[] xPath = new String[] { "/Extern" };\r
 \r
         Object[] returns = get("Externs", xPath);\r
@@ -866,7 +866,7 @@ public class SurfaceAreaQuery {
      * @returns String[] if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getPpiNotifyArray(String arch) {\r
+    public String[] getPpiNotifyArray(String arch) {\r
         String[] xPath;\r
 \r
         if (arch == null || arch.equals("")) {\r
@@ -907,7 +907,7 @@ public class SurfaceAreaQuery {
      * @returns String[] if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getPpiNotifyArray(String arch, String usage) {\r
+    public String[] getPpiNotifyArray(String arch, String usage) {\r
 \r
         String[] xPath;\r
         String usageXpath;\r
@@ -947,7 +947,7 @@ public class SurfaceAreaQuery {
      * @returns String[] if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getPpiArray(String arch) {\r
+    public String[] getPpiArray(String arch) {\r
         String[] xPath;\r
 \r
         if (arch == null || arch.equals("")) {\r
@@ -986,7 +986,7 @@ public class SurfaceAreaQuery {
      * @returns String[] if elements are found at the known xpath\r
      * @returns String[0] if nothing is there\r
      */\r
-    public static String[] getPpiArray(String arch, String usage) {\r
+    public String[] getPpiArray(String arch, String usage) {\r
 \r
         String[] xPath;\r
         String usageXpath;\r
@@ -1026,7 +1026,7 @@ public class SurfaceAreaQuery {
      * @returns GuidEntry objects list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getGuidEntryArray(String arch) {\r
+    public String[] getGuidEntryArray(String arch) {\r
         String[] xPath;\r
 \r
         if (arch == null || arch.equals("")) {\r
@@ -1065,7 +1065,7 @@ public class SurfaceAreaQuery {
      * @returns GuidEntry objects list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getGuidEntryArray(String arch, String usage) {\r
+    public String[] getGuidEntryArray(String arch, String usage) {\r
         String[] xPath;\r
         String archXpath;\r
         String usageXpath;\r
@@ -1107,7 +1107,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static ModuleIdentification[] getLibraryInstance(String arch) {\r
+    public ModuleIdentification[] getLibraryInstance(String arch) {\r
         String[] xPath;\r
         String saGuid = null;\r
         String saVersion = null;\r
@@ -1156,7 +1156,7 @@ public class SurfaceAreaQuery {
     // / This method is used for retrieving the elements information which has\r
     // / CName sub-element\r
     // /\r
-    private static String[] getCNames(String from, String xPath[]) {\r
+    private String[] getCNames(String from, String xPath[]) {\r
         Object[] returns = get(from, xPath);\r
         if (returns == null || returns.length == 0) {\r
             return null;\r
@@ -1177,7 +1177,7 @@ public class SurfaceAreaQuery {
      * @returns constructor name list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String getLibConstructorName() {\r
+    public String getLibConstructorName() {\r
         String[] xPath = new String[] { "/Extern/Constructor" };\r
 \r
         Object[] returns = get("Externs", xPath);\r
@@ -1195,7 +1195,7 @@ public class SurfaceAreaQuery {
      * @returns destructor name list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String getLibDestructorName() {\r
+    public String getLibDestructorName() {\r
         String[] xPath = new String[] { "/Extern/Destructor" };\r
 \r
         Object[] returns = get("Externs", xPath);\r
@@ -1216,7 +1216,7 @@ public class SurfaceAreaQuery {
      * @returns DriverBinding name list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getDriverBindingArray() {\r
+    public String[] getDriverBindingArray() {\r
         String[] xPath = new String[] { "/Extern/DriverBinding" };\r
         return getCNames("Externs", xPath);\r
     }\r
@@ -1227,7 +1227,7 @@ public class SurfaceAreaQuery {
      * @returns ComponentName name list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getComponentNameArray() {\r
+    public String[] getComponentNameArray() {\r
         String[] xPath = new String[] { "/Extern/ComponentName" };\r
         return getCNames("Externs", xPath);\r
     }\r
@@ -1238,7 +1238,7 @@ public class SurfaceAreaQuery {
      * @returns DriverConfig name list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getDriverConfigArray() {\r
+    public String[] getDriverConfigArray() {\r
         String[] xPath = new String[] { "/Extern/DriverConfig" };\r
         return getCNames("Externs", xPath);\r
     }\r
@@ -1249,7 +1249,7 @@ public class SurfaceAreaQuery {
      * @returns DriverDiag name list if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getDriverDiagArray() {\r
+    public String[] getDriverDiagArray() {\r
         String[] xPath = new String[] { "/Extern/DriverDiag" };\r
         return getCNames("Externs", xPath);\r
     }\r
@@ -1261,7 +1261,7 @@ public class SurfaceAreaQuery {
      *          the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getSetVirtualAddressMapCallBackArray() {\r
+    public String[] getSetVirtualAddressMapCallBackArray() {\r
         String[] xPath = new String[] { "/Extern/SetVirtualAddressMapCallBack" };\r
         return getCNames("Externs", xPath);\r
     }\r
@@ -1273,7 +1273,7 @@ public class SurfaceAreaQuery {
      *          known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[] getExitBootServicesCallBackArray() {\r
+    public String[] getExitBootServicesCallBackArray() {\r
         String[] xPath = new String[] { "/Extern/ExitBootServicesCallBack" };\r
         return getCNames("Externs", xPath);\r
     }\r
@@ -1284,7 +1284,7 @@ public class SurfaceAreaQuery {
       \r
       @return CommonDefinition.PCD_DRIVER_TYPE  the type of current driver\r
     **/\r
-    public static CommonDefinition.PCD_DRIVER_TYPE getPcdDriverType() {\r
+    public CommonDefinition.PCD_DRIVER_TYPE getPcdDriverType() {\r
         String[] xPath   = new String[] {"/PcdIsDriver"};\r
         Object[] results = get ("Externs", xPath);\r
 \r
@@ -1308,7 +1308,7 @@ public class SurfaceAreaQuery {
      * @returns ModuleSA objects list if elements are found at the known xpath\r
      * @returns Empty ModuleSA list if nothing is there\r
      */\r
-    public static Map<FpdModuleIdentification, Map<String, XmlObject>> getFpdModules() {\r
+    public Map<FpdModuleIdentification, Map<String, XmlObject>> getFpdModules() {\r
         String[] xPath = new String[] { "/FrameworkModules/ModuleSA" };\r
         Object[] result = get("PlatformSurfaceArea", xPath);\r
         String arch = null;\r
@@ -1399,7 +1399,7 @@ public class SurfaceAreaQuery {
      * @returns valid iamges name list if elements are found at the known xpath\r
      * @returns empty list if nothing is there\r
      */\r
-    public static String[] getFpdValidImageNames() {\r
+    public String[] getFpdValidImageNames() {\r
         String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='ImageName']/FvImageNames" };\r
 \r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
@@ -1415,7 +1415,7 @@ public class SurfaceAreaQuery {
         return result;\r
     }\r
 \r
-    public static Node getFpdUserExtensionPreBuild() {\r
+    public Node getFpdUserExtensionPreBuild() {\r
         String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='0']" };\r
 \r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
@@ -1427,7 +1427,7 @@ public class SurfaceAreaQuery {
         return a.getDomNode();\r
     }\r
 \r
-    public static Node getFpdUserExtensionPostBuild() {\r
+    public Node getFpdUserExtensionPostBuild() {\r
         String[] xPath = new String[] { "/UserExtensions[@UserID='TianoCore' and @Identifier='1']" };\r
 \r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
@@ -1448,7 +1448,7 @@ public class SurfaceAreaQuery {
      * @returns option name/value list if elements are found at the known xpath\r
      * @returns empty list if nothing is there\r
      */\r
-    public static String[][] getFpdOptions(String fvName) {\r
+    public String[][] getFpdOptions(String fvName) {\r
            String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='Options' and ./FvImageNames='"\r
                       + fvName + "']/FvImageOptions" };\r
            Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
@@ -1476,7 +1476,7 @@ public class SurfaceAreaQuery {
 \r
     }\r
 \r
-    public static XmlObject getFpdBuildOptions() {\r
+    public XmlObject getFpdBuildOptions() {\r
         String[] xPath = new String[] { "/BuildOptions" };\r
 \r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
@@ -1487,7 +1487,7 @@ public class SurfaceAreaQuery {
         return (XmlObject)queryResult[0];\r
     }\r
 \r
-    public static PlatformIdentification getFpdHeader() {\r
+    public PlatformIdentification getFpdHeader() {\r
         String[] xPath = new String[] { "/PlatformHeader" };\r
 \r
         Object[] returns = get("PlatformSurfaceArea", xPath);\r
@@ -1516,7 +1516,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns empty list if nothing is there\r
      */\r
-    public static String[][] getFpdAttributes(String fvName) {\r
+    public String[][] getFpdAttributes(String fvName) {\r
         String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='Attributes' and ./FvImageNames='"\r
                          + fvName + "']/FvImageOptions" };\r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
@@ -1549,7 +1549,7 @@ public class SurfaceAreaQuery {
      * @returns file name if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String getFlashDefinitionFile() {\r
+    public String getFlashDefinitionFile() {\r
         String[] xPath = new String[] { "/PlatformDefinitions/FlashDeviceDefinitions/FlashDefinitionFile" };\r
 \r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
@@ -1561,7 +1561,7 @@ public class SurfaceAreaQuery {
         return filename.getStringValue();\r
     }\r
 \r
-    public static String[][] getFpdGlobalVariable() {\r
+    public String[][] getFpdGlobalVariable() {\r
         String[] xPath = new String[] { "/Flash/FvImages/NameValue" };\r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
         if (queryResult == null) {\r
@@ -1587,7 +1587,7 @@ public class SurfaceAreaQuery {
      * @returns name/value pairs list if elements are found at the known xpath\r
      * @returns empty list if nothing is there\r
      */\r
-    public static String[][] getFpdComponents(String fvName) {\r
+    public String[][] getFpdComponents(String fvName) {\r
         String[] xPath = new String[] { "/Flash/FvImages/FvImage[@Type='Components' and ./FvImageNames='"+ fvName + "']/FvImageOptions" };\r
         Object[] queryResult = get("PlatformSurfaceArea", xPath);\r
         if (queryResult == null) {\r
@@ -1620,7 +1620,7 @@ public class SurfaceAreaQuery {
      *          xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String[][] getPcdTokenArray() {\r
+    public String[][] getPcdTokenArray() {\r
         String[] xPath = new String[] { "/PcdData" };\r
 \r
         Object[] returns = get("PCDs", xPath);\r
@@ -1637,7 +1637,7 @@ public class SurfaceAreaQuery {
      * @return\r
      * @return\r
      */\r
-    public static ModuleIdentification getMsaHeader() {\r
+    public ModuleIdentification getMsaHeader() {\r
         String[] xPath = new String[] { "/" };\r
         Object[] returns = get("MsaHeader", xPath);\r
 \r
@@ -1673,7 +1673,7 @@ public class SurfaceAreaQuery {
      *\r
      */\r
 \r
-    public static String[] getExternSpecificaiton() {\r
+    public String[] getExternSpecificaiton() {\r
         String[] xPath = new String[] { "/Specification" };\r
 \r
         Object[] queryResult = get("Externs", xPath);\r
@@ -1696,7 +1696,7 @@ public class SurfaceAreaQuery {
      * @return String[][3] The string sequence is ModuleName, ModuleGuid,\r
      *         ModuleVersion, MsaFile String[0][] If no msafile in SPD\r
      */\r
-    public static String[] getSpdMsaFile() {\r
+    public String[] getSpdMsaFile() {\r
         String[] xPath = new String[] { "/MsaFiles" };\r
 \r
         Object[] returns = get("PackageSurfaceArea", xPath);\r
@@ -1712,7 +1712,7 @@ public class SurfaceAreaQuery {
     /**\r
      * Reteive\r
      */\r
-    public static Map<String, String[]> getSpdLibraryClasses() {\r
+    public Map<String, String[]> getSpdLibraryClasses() {\r
         String[] xPath = new String[] { "/LibraryClassDeclarations/LibraryClass" };\r
 \r
         Object[] returns = get("PackageSurfaceArea", xPath);\r
@@ -1737,7 +1737,7 @@ public class SurfaceAreaQuery {
     /**\r
      * Reteive\r
      */\r
-    public static Map<String, String> getSpdPackageHeaderFiles() {\r
+    public Map<String, String> getSpdPackageHeaderFiles() {\r
         String[] xPath = new String[] { "/PackageHeaders/IncludePkgHeader" };\r
 \r
         Object[] returns = get("PackageSurfaceArea", xPath);\r
@@ -1759,7 +1759,7 @@ public class SurfaceAreaQuery {
         return packageIncludeMap;\r
     }\r
 \r
-    public static PackageIdentification getSpdHeader() {\r
+    public PackageIdentification getSpdHeader() {\r
         String[] xPath = new String[] { "/SpdHeader" };\r
 \r
         Object[] returns = get("PackageSurfaceArea", xPath);\r
@@ -1782,7 +1782,7 @@ public class SurfaceAreaQuery {
     /**\r
      * Reteive\r
      */\r
-    public static Map<String, String[]> getSpdGuid() {\r
+    public Map<String, String[]> getSpdGuid() {\r
         String[] xPath = new String[] { "/GuidDeclarations/Entry" };\r
 \r
         Object[] returns = get("PackageSurfaceArea", xPath);\r
@@ -1811,7 +1811,7 @@ public class SurfaceAreaQuery {
     /**\r
      * Reteive\r
      */\r
-    public static Map<String, String[]> getSpdProtocol() {\r
+    public Map<String, String[]> getSpdProtocol() {\r
         String[] xPath = new String[] { "/ProtocolDeclarations/Entry" };\r
 \r
         Object[] returns = get("PackageSurfaceArea", xPath);\r
@@ -1847,7 +1847,7 @@ public class SurfaceAreaQuery {
      *         Name String[0] - PPI CNAME String[1] - PPI Guid Null if no PPI\r
      *         entry in SPD.\r
      */\r
-    public static Map<String, String[]> getSpdPpi() {\r
+    public Map<String, String[]> getSpdPpi() {\r
         String[] xPath = new String[] { "/PpiDeclarations/Entry" };\r
 \r
         Object[] returns = get("PackageSurfaceArea", xPath);\r
@@ -1877,7 +1877,7 @@ public class SurfaceAreaQuery {
      * @returns GUILD string if elements are found at the known xpath\r
      * @returns null if nothing is there\r
      */\r
-    public static String getModuleGuid() {\r
+    public String getModuleGuid() {\r
         String[] xPath = new String[] { "" };\r
 \r
         Object[] returns = get("MsaHeader", xPath);\r
@@ -1893,7 +1893,7 @@ public class SurfaceAreaQuery {
     //\r
     // For new Pcd\r
     //\r
-    public static ModuleSADocument.ModuleSA[] getFpdModuleSAs() {\r
+    public ModuleSADocument.ModuleSA[] getFpdModuleSAs() {\r
         String[] xPath = new String[] { "/FrameworkModules/ModuleSA" };\r
         Object[] result = get("PlatformSurfaceArea", xPath);\r
         if (result != null) {\r
@@ -1908,7 +1908,7 @@ public class SurfaceAreaQuery {
 \r
     @return String[]\r
     **/\r
-    public static String[] getModulePcdEntryNameArray() {\r
+    public String[] getModulePcdEntryNameArray() {\r
         PcdCodedDocument.PcdCoded.PcdEntry[] pcdEntries  = null;\r
         String[]            results;\r
         int                 index;\r
@@ -1933,7 +1933,7 @@ public class SurfaceAreaQuery {
 \r
      @return boolean\r
      **/\r
-    public static boolean contains(List list, String str) {\r
+    public boolean contains(List list, String str) {\r
                if (list == null || list.size()== 0) {\r
                        return true;\r
                }\r
@@ -1948,7 +1948,7 @@ public class SurfaceAreaQuery {
         return false;\r
     }\r
 \r
-       public static boolean isHaveTianoR8FlashMap(){\r
+       public boolean isHaveTianoR8FlashMap(){\r
         String[]            xPath       = new String[] {"/"};\r
         Object[]         returns     = get ("Externs", xPath);\r
 \r