X-Git-Url: https://git.proxmox.com/?a=blobdiff_plain;f=Tools%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FGuid.java;fp=Tools%2FSource%2FMigrationTools%2Forg%2Ftianocore%2Fmigration%2FGuid.java;h=5cdaf44781a67243576652b011d08e40902cae57;hb=0dc8c5893276cf6638727060d31bca322eba2805;hp=0000000000000000000000000000000000000000;hpb=c8b59d238ccbcabb24a672208df1e95551b3ecdd;p=mirror_edk2.git diff --git a/Tools/Source/MigrationTools/org/tianocore/migration/Guid.java b/Tools/Source/MigrationTools/org/tianocore/migration/Guid.java new file mode 100644 index 0000000000..5cdaf44781 --- /dev/null +++ b/Tools/Source/MigrationTools/org/tianocore/migration/Guid.java @@ -0,0 +1,49 @@ +package org.tianocore.migration; + +import java.util.regex.*; + +public class Guid { + Guid (String r8, String t, String n, String r9, String gv, String p) { + r8name = r8; + type = t; + name = n; + r9name = r9; + guidvalue = gv; + pack = p; + } + Guid (String[] linecontext, String t) { + r8name = linecontext[1]; + type = t; + name = linecontext[0]; + r9name = linecontext[2]; + guidvalue = linecontext[3]; + pack = linecontext[4]; + } + public String r8name; + public String type; + public String name; + public String r9name; + public String guidvalue; + public String pack; + + public static Pattern ptnguid = Pattern.compile("g\\w*Guid"); + + public static String register(Matcher mtr, ModuleInfo mi, Database db) { + String type = null; + String temp = null; + + temp = mtr.group(); + if (db.hasGuid(temp)) { // only changed guids registered, because both changed and not changed guids are included in database + type = db.getGuidType(temp); + if (type.matches("Protocol")) { + mi.protocol.add(temp); + } else if (type.matches("Ppi")) { + mi.ppi.add(temp); + } else if (type.matches("Guid")) { + mi.guid.add(temp); + } + return temp; + } + return null; + } +} \ No newline at end of file