]>
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
.*;
17 import org
.tianocore
.UsageTypes
;
20 Guid (String r8
, String t
, String n
, String r9
, String gv
, String p
) {
28 Guid (String
[] linecontext
, String t
) {
29 r8name
= linecontext
[1];
31 name
= linecontext
[0];
32 r9name
= linecontext
[2];
33 guidvalue
= linecontext
[3];
34 pack
= linecontext
[4];
40 public String guidvalue
;
43 public static Pattern ptnguid
= Pattern
.compile("g\\w*Guid");
45 public static String
register(Matcher mtr
, ModuleInfo mi
, Database db
) {
50 if (MigrationTool
.db
.hasGuid(temp
)) { // only changed guids registered, because both changed and not changed guids are included in database
51 type
= MigrationTool
.db
.getGuidType(temp
);
52 if (type
.matches("Protocol")) {
53 mi
.addProtocol(temp
, UsageTypes
.ALWAYS_CONSUMED
);
54 //mi.protocols.add(temp);
55 } else if (type
.matches("Ppi")) {
56 mi
.addPpi(temp
, UsageTypes
.ALWAYS_CONSUMED
);
58 } else if (type
.matches("Guid")) {
59 mi
.addGuid(temp
, UsageTypes
.ALWAYS_CONSUMED
);