]> git.proxmox.com Git - mirror_edk2.git/blobdiff - Tools/Java/Source/MigrationTools/org/tianocore/migration/Guid.java
Coding Style
[mirror_edk2.git] / Tools / Java / Source / MigrationTools / org / tianocore / migration / Guid.java
index bbf79d8ca6f03645eb9778062ca2397896bf8dbb..e43b62aff46b20de1f712e54d78e785b546584cb 100644 (file)
  **/\r
 package org.tianocore.migration;\r
 \r
-import java.util.regex.*;\r
+import java.util.regex.Matcher;\r
+import java.util.regex.Pattern;\r
 \r
 import org.tianocore.UsageTypes;\r
 \r
 public class Guid {\r
-    Guid (String r8, String t, String n, String r9, String gv, String p) {\r
-        r8name = r8;\r
-        type = t;\r
-        name = n;\r
-        r9name = r9;\r
-        guidvalue = gv;\r
-        pack = p;\r
-    }\r
-    Guid (String[] linecontext, String t) {\r
-        r8name = linecontext[1];\r
-        type = t;\r
-        name = linecontext[0];\r
-        r9name = linecontext[2];\r
-        guidvalue = linecontext[3];\r
-        pack = linecontext[4];\r
-    }\r
-    public String r8name;\r
-    public String type;\r
-    public String name;\r
-    public String r9name;\r
-    public String guidvalue;\r
-    public String pack;\r
+       Guid(String r8, String t, String n, String r9, String gv, String p) {\r
+               r8name = r8;\r
+               type = t;\r
+               name = n;\r
+               r9name = r9;\r
+               guidvalue = gv;\r
+               pack = p;\r
+       }\r
 \r
-    public static Pattern ptnguid = Pattern.compile("g\\w*Guid");\r
+       Guid(String[] linecontext, String t) {\r
+               r8name = linecontext[1];\r
+               type = t;\r
+               name = linecontext[0];\r
+               r9name = linecontext[2];\r
+               guidvalue = linecontext[3];\r
+               pack = linecontext[4];\r
+       }\r
 \r
-    public static String register(Matcher mtr, ModuleInfo mi, Database db) {\r
-        String type = null;\r
-        String temp = null;\r
-        \r
-        temp = mtr.group();\r
-        if (MigrationTool.db.hasGuid(temp)) {        // only changed guids registered, because both changed and not changed guids are included in database\r
-            type = MigrationTool.db.getGuidType(temp);\r
-            if (type.matches("Protocol")) {\r
-               mi.addProtocol(temp, UsageTypes.ALWAYS_CONSUMED);\r
-                //mi.protocols.add(temp);\r
-            } else if (type.matches("Ppi")) {\r
-               mi.addPpi(temp, UsageTypes.ALWAYS_CONSUMED);\r
-                //mi.ppis.add(temp);\r
-            } else if (type.matches("Guid")) {\r
-               mi.addGuid(temp, UsageTypes.ALWAYS_CONSUMED);\r
-                //mi.guids.add(temp);\r
-            }\r
-            return temp;\r
-        }\r
-        return null;\r
-    }\r
+       public String r8name;\r
+\r
+       public String type;\r
+\r
+       public String name;\r
+\r
+       public String r9name;\r
+\r
+       public String guidvalue;\r
+\r
+       public String pack;\r
+\r
+       public static Pattern ptnguid = Pattern.compile("g\\w*Guid");\r
+\r
+       public static String register(Matcher mtr, ModuleInfo mi, Database db) {\r
+               String type = null;\r
+               String temp = null;\r
+\r
+               temp = mtr.group();\r
+               if (MigrationTool.db.hasGuid(temp)) { // only changed guids\r
+                                                                                               // registered, because both\r
+                                                                                               // changed and not changed guids\r
+                                                                                               // are included in database\r
+                       type = MigrationTool.db.getGuidType(temp);\r
+                       if (type.matches("Protocol")) {\r
+                               mi.addProtocol(temp, UsageTypes.ALWAYS_CONSUMED);\r
+                               // mi.protocols.add(temp);\r
+                       } else if (type.matches("Ppi")) {\r
+                               mi.addPpi(temp, UsageTypes.ALWAYS_CONSUMED);\r
+                               // mi.ppis.add(temp);\r
+                       } else if (type.matches("Guid")) {\r
+                               mi.addGuid(temp, UsageTypes.ALWAYS_CONSUMED);\r
+                               // mi.guids.add(temp);\r
+                       }\r
+                       return temp;\r
+               }\r
+               return null;\r
+       }\r
 }
\ No newline at end of file