]>
git.proxmox.com Git - mirror_edk2.git/blob - Tools/Java/Source/MigrationTools/org/tianocore/migration/Guid.java
3 Copyright (c) 2006, Intel Corporation
4 All rights reserved. This program and the accompanying materials
5 are licensed and made available under the terms and conditions of the BSD License
6 which accompanies this distribution. The full text of the license may be found at
7 http://opensource.org/licenses/bsd-license.php
9 THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,
10 WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
13 package org
.tianocore
.migration
;
15 import java
.util
.regex
.Matcher
;
16 import java
.util
.regex
.Pattern
;
18 import org
.tianocore
.UsageTypes
;
21 Guid(String r8
, String t
, String n
, String r9
, String gv
, String p
) {
30 Guid(String
[] linecontext
, String t
) {
31 r8name
= linecontext
[1];
33 name
= linecontext
[0];
34 r9name
= linecontext
[2];
35 guidvalue
= linecontext
[3];
36 pack
= linecontext
[4];
47 public String guidvalue
;
51 public static Pattern ptnguid
= Pattern
.compile("g\\w*Guid");
53 public static String
register(Matcher mtr
, ModuleInfo mi
, Database db
) {
58 if (MigrationTool
.db
.hasGuid(temp
)) { // only changed guids
59 // registered, because both
60 // changed and not changed guids
61 // are included in database
62 type
= MigrationTool
.db
.getGuidType(temp
);
63 if (type
.matches("Protocol")) {
64 mi
.addProtocol(temp
, UsageTypes
.ALWAYS_CONSUMED
);
65 // mi.protocols.add(temp);
66 } else if (type
.matches("Ppi")) {
67 mi
.addPpi(temp
, UsageTypes
.ALWAYS_CONSUMED
);
69 } else if (type
.matches("Guid")) {
70 mi
.addGuid(temp
, UsageTypes
.ALWAYS_CONSUMED
);
71 // mi.guids.add(temp);