]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/GenBuild/org/tianocore/build/pcd/entity/UsageInstance.java
In before, module type is judged by the sub element value in <ModuleSA>, it is not...
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / pcd / entity / UsageInstance.java
index 2769d497f70d75e0e9831b64857fa38e3d571210..3bebc45829afbcdb91e11c76abcd6b03d3fb8e74 100644 (file)
@@ -19,7 +19,7 @@ package org.tianocore.build.pcd.entity;
 \r
 \r
 import java.util.UUID;\r
-\r
+import org.tianocore.ModuleTypeDef;\r
 import org.tianocore.build.autogen.CommonDefinition;\r
 import org.tianocore.build.pcd.action.ActionMessage;\r
 import org.tianocore.build.pcd.exception.EntityException;\r
@@ -30,11 +30,6 @@ import org.tianocore.build.pcd.exception.EntityException;
   is an usage instance for this PCD token.\r
 **/\r
 public class UsageInstance {\r
-    ///\r
-    /// The module type of usage instance.\r
-    /// \r
-    public enum MODULE_TYPE {SEC, PEI_CORE, PEIM, DXE_CORE, DXE_DRIVERS, OTHER_COMPONENTS}\r
-\r
     ///\r
     /// This parent that this usage instance belongs to.\r
     ///\r
@@ -78,7 +73,7 @@ public class UsageInstance {
     ///\r
     /// The module type for this usage instance.\r
     ///\r
-    public MODULE_TYPE      moduleType;\r
+    public ModuleTypeDef.Enum    moduleType;\r
 \r
     ///\r
     /// The value of the PCD in this usage instance. \r
@@ -122,7 +117,7 @@ public class UsageInstance {
                           UUID              moduleGUID,\r
                           String            packageName,\r
                           UUID              packageGUID,\r
-                          MODULE_TYPE       moduleType,\r
+                          ModuleTypeDef.Enum moduleType,\r
                           Token.PCD_TYPE    modulePcdType,\r
                           String            arch,\r
                           String            version,\r
@@ -185,8 +180,8 @@ public class UsageInstance {
        @return boolean\r
      */\r
     public boolean isPeiPhaseComponent() {\r
-        if ((moduleType == MODULE_TYPE.PEI_CORE) ||\r
-            (moduleType == MODULE_TYPE.PEIM)) {\r
+        if ((moduleType == ModuleTypeDef.PEI_CORE) ||\r
+            (moduleType == ModuleTypeDef.PEIM)) {\r
             return true;\r
         }\r
         return false;\r