]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Source/PcdTools/org/tianocore/pcd/entity/CommonDefinition.java
Fixed grammar in messages.
[mirror_edk2.git] / Tools / Source / PcdTools / org / tianocore / pcd / entity / CommonDefinition.java
index c16bb04f100d8a7a761593410df283918951ab6a..3cd272f719c5b1891c50916361737149fb2d4447 100644 (file)
@@ -2,29 +2,28 @@
  CommonDefinition class.\r
 \r
  This class is to define some common marcos and funcions, which used by AutoGen.\r
\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
+\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.pcd.entity;\r
 \r
-import java.util.HashSet;\r
 import java.util.Iterator;\r
 import java.util.LinkedHashSet;\r
 import java.util.Set;\r
 \r
 /**\r
   CommonDefinition\r
-  \r
+\r
   This class is to define some common marcos, which used by AutoGen.\r
-  \r
+\r
 **/\r
 public class CommonDefinition {\r
     public final static String spdSuffix = ".spd";\r
@@ -34,7 +33,7 @@ public class CommonDefinition {
     public final static String autoGenHbegin = "extern int __make_me_compile_correctly;\r\n";\r
     public final static String include = "#include";\r
     public final static String autoGenCLine1 = "\r\n";\r
-    \r
+\r
     public final static String autoGenCLine2 = "const UINT8  _gDebugPropertyMask "\r
                     + "= DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED"\r
                     + "  | DEBUG_PROPERTY_DEBUG_PRINT_ENABLED"\r
@@ -42,7 +41,7 @@ public class CommonDefinition {
 \r
     public final static String autoGenCLine3 = "const UINTN  _gModuleDefaultErrorLevel"\r
                     + " = EFI_D_ERROR | EFI_D_LOAD;\r\n";\r
-    \r
+\r
     public final static String autoGenHLine1          = "#define EFI_SPECIFICATION_VERSION    0x00020000\r\n";\r
     public final static String autoGenHVersionDefault = "#define EFI_SPECIFICATION_VERSION    0x00000000\r\n";\r
     public final static String autoGenHLine2          = "#define EDK_RELEASE_VERSION        0x00090000\r\n";\r
@@ -58,11 +57,11 @@ public class CommonDefinition {
 \r
        public final static String tianoR8FlashMapH = "TianoR8FlashMap.h";\r
        public final static String flashMapH = "FlashMap.h";\r
-    \r
+\r
     //\r
     // AutoGen.h and AutoGen.c file's header\r
     //\r
-    public final static String autogenHNotation = \r
+    public final static String autogenHNotation =\r
       "/**\r\n" +\r
       "  DO NOT EDIT\r\n" +\r
       "  FILE auto-generated by GenBuild tasks\r\n" +\r
@@ -71,8 +70,8 @@ public class CommonDefinition {
       "  Abstract:" +\r
       "       Auto-generated AutoGen.h for building module or library.\r\n" +\r
       "**/\r\n\r\n";\r
-        \r
-    public final static String autogenCNotation = \r
+\r
+    public final static String autogenCNotation =\r
         "/**\r\n" +\r
         "  DO NOT EDIT\r\n" +\r
         "  FILE auto-generated by GenBuild tasks\r\n" +\r
@@ -81,7 +80,7 @@ public class CommonDefinition {
         "  Abstract:" +\r
         "       Auto-generated AutoGen.c for building module or library.\r\n" +\r
         "**/\r\n\r\n";\r
-    \r
+\r
     //\r
     // module type\r
     //\r
@@ -97,11 +96,11 @@ public class CommonDefinition {
     public final static int ModuleTypeUefiDriver = 9;\r
     public final static int ModuleTypeUefiApplication = 10;\r
     public final static int ModuleTypeUnknown = 11;\r
-    \r
-   \r
+\r
+\r
     //\r
     // component type\r
-    //                           \r
+    //\r
     public final static int  ComponentTypeNull = 0;\r
     public final static int  ComponentTypeApriori = 1;\r
     public final static int  ComponentTypeSec = 2;\r
@@ -123,13 +122,13 @@ public class CommonDefinition {
     public final static int  ComponentTypeCustomBuild = 18;\r
     public final static int  ComponentTypeUnknown = 19;\r
 \r
-    \r
+\r
     //\r
     // Usaged style\r
     //\r
     public final static String AlwaysConsumed = "ALWAYS_CONSUMED";\r
     public final static String AlwaysProduced = "ALWAYS_PRODUCED";\r
-  \r
+\r
 \r
     public static class MyEnum {\r
         String moduleTypeStr;\r
@@ -147,7 +146,7 @@ public class CommonDefinition {
                 return -1;\r
         }\r
     }\r
-    \r
+\r
     //\r
     // Module type\r
     //\r
@@ -163,7 +162,7 @@ public class CommonDefinition {
                     new MyEnum("DXE_SMM_DRIVER", ModuleTypeDxeSmmDriver),\r
                     new MyEnum("UEFI_DRIVER", ModuleTypeUefiDriver),\r
                     new MyEnum("UEFI_APPLICATION", ModuleTypeUefiApplication) };\r
-    \r
+\r
     //\r
     // Component type\r
     //\r
@@ -187,14 +186,14 @@ public class CommonDefinition {
                     new MyEnum("LOGO", ComponentTypeLogo),\r
                     new MyEnum("CUSTOM_BUILD", ComponentTypeCustomBuild)\r
                     };\r
-   \r
+\r
     /**\r
       getModuleType\r
-      \r
+\r
       This function get the module type value according module type string.\r
-      \r
+\r
       @param  moduleTypeStr     String of modlue type.\r
-      @return                   \r
+      @return\r
     **/\r
     static public int getModuleType(String moduleTypeStr) {\r
         int returnValue = -1;\r
@@ -209,10 +208,10 @@ public class CommonDefinition {
 \r
     /**\r
       getComponentType\r
-      \r
-      This function get the component type value according commponet type \r
+\r
+      This function get the component type value according commponet type\r
       string.\r
-      \r
+\r
       @param    componentTypeStr  String of component type.\r
       @return\r
     **/\r
@@ -229,18 +228,18 @@ public class CommonDefinition {
 \r
     /**\r
     getComponentTypeString\r
-    \r
+\r
     This function get the commponet type string according component type value.\r
-    \r
+\r
     @param    componentType  Integer value of component type.\r
     @return\r
   **/\r
     static public String getComponentTypeString (int componentType) {\r
-      if ((componentType > CommonDefinition.ComponentTypeUnknown) || \r
+      if ((componentType > CommonDefinition.ComponentTypeUnknown) ||\r
           (componentType < CommonDefinition.ComponentTypeNull)) {\r
         return null;\r
       }\r
-      for (int index = 0; index < CommonDefinition.componentEnum.length; index ++) {\r
+      for (int index = 0; index < CommonDefinition.componentEnum.length; index++) {\r
         if (componentType == CommonDefinition.componentEnum[index].type) {\r
           return CommonDefinition.componentEnum[index].moduleTypeStr;\r
         }\r
@@ -249,11 +248,11 @@ public class CommonDefinition {
     }\r
 \r
     /**\r
-      isLibraryComponent \r
-      \r
+      isLibraryComponent\r
+\r
       This function is to check does componet is library according to commponet\r
       type value.\r
-      \r
+\r
       @param   componentType     Integer value of component type.\r
       @return\r
     **/\r
@@ -263,12 +262,12 @@ public class CommonDefinition {
       }\r
       return false;\r
     }\r
-    \r
+\r
     /**\r
      * formateGuidName\r
-     * \r
+     *\r
      * This function is to formate GUID to ANSI c form.\r
-     * \r
+     *\r
      * @param guidNameCon\r
      *            String of GUID.\r
      * @return Formated GUID.\r
@@ -317,17 +316,17 @@ public class CommonDefinition {
             return guid;\r
         } else {\r
             System.out\r
-                    .println("Check GUID Value, it don't conform to the schema!!!");\r
+                    .println("Check GUID Value, it doesn't conform to the registry format specified by the schema!!!");\r
             return "0";\r
 \r
         }\r
     }\r
-    \r
+\r
     /**\r
      * Remove deuplicat string in list\r
-     * \r
+     *\r
      * This function is to duplicat string in list\r
-     * \r
+     *\r
      * @param String[]\r
      *            String list.\r
      * @return String[] String list which remove the duplicate string.\r
@@ -350,5 +349,5 @@ public class CommonDefinition {
         }\r
         return desList;\r
     }\r
-    \r
-}
\ No newline at end of file
+\r
+}\r