]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/MigrationTools/org/tianocore/migration/Guid.java
git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@1239 6f19259b...
[mirror_edk2.git] / Tools / Source / MigrationTools / org / tianocore / migration / Guid.java
CommitLineData
0dc8c589 1package org.tianocore.migration;\r
2\r
3import java.util.regex.*;\r
4\r
5public class Guid {\r
6 Guid (String r8, String t, String n, String r9, String gv, String p) {\r
7 r8name = r8;\r
8 type = t;\r
9 name = n;\r
10 r9name = r9;\r
11 guidvalue = gv;\r
12 pack = p;\r
13 }\r
14 Guid (String[] linecontext, String t) {\r
15 r8name = linecontext[1];\r
16 type = t;\r
17 name = linecontext[0];\r
18 r9name = linecontext[2];\r
19 guidvalue = linecontext[3];\r
20 pack = linecontext[4];\r
21 }\r
22 public String r8name;\r
23 public String type;\r
24 public String name;\r
25 public String r9name;\r
26 public String guidvalue;\r
27 public String pack;\r
28\r
29 public static Pattern ptnguid = Pattern.compile("g\\w*Guid");\r
30\r
31 public static String register(Matcher mtr, ModuleInfo mi, Database db) {\r
32 String type = null;\r
33 String temp = null;\r
34 \r
35 temp = mtr.group();\r
36 if (db.hasGuid(temp)) { // only changed guids registered, because both changed and not changed guids are included in database\r
37 type = db.getGuidType(temp);\r
38 if (type.matches("Protocol")) {\r
39 mi.protocol.add(temp);\r
40 } else if (type.matches("Ppi")) {\r
41 mi.ppi.add(temp);\r
42 } else if (type.matches("Guid")) {\r
43 mi.guid.add(temp);\r
44 }\r
45 return temp;\r
46 }\r
47 return null;\r
48 }\r
49}