]> git.proxmox.com Git - mirror_edk2.git/blame - Tools/Source/GenBuild/org/tianocore/build/fpd/FpdModuleIdentification.java
Initial import.
[mirror_edk2.git] / Tools / Source / GenBuild / org / tianocore / build / fpd / FpdModuleIdentification.java
CommitLineData
878ddf1f 1/** @file\r
2 Java class FpdModuleIdentification is used to present a module identification\r
3 from BaseName, GUID, Version, PackageName, and ARCH. \r
4 \r
5Copyright (c) 2006, Intel Corporation\r
6All rights reserved. This program and the accompanying materials\r
7are licensed and made available under the terms and conditions of the BSD License\r
8which accompanies this distribution. The full text of the license may be found at\r
9http://opensource.org/licenses/bsd-license.php\r
10\r
11THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
12WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
13**/\r
14package org.tianocore.build.fpd;\r
15\r
16/**\r
17 This class is used to identify a module with BaseName, GUID, Version, PackageName\r
18 and ARCH.\r
19 \r
20 @since GenBuild 1.0\r
21 **/\r
22public class FpdModuleIdentification {\r
23 \r
24 private String arch;\r
25 \r
26 private String fvBinding;\r
27 \r
28 private String baseName;\r
29 \r
30 private String packageName;\r
31 \r
32 private String guid;\r
33 \r
34 private String version;\r
35 \r
36 private String sequence;\r
37 \r
38 /**\r
39 \r
40 @param baseName the base name of the module\r
41 @param guid the GUID of the module\r
42 @param arch the ARCH of the module\r
43 **/\r
44 public FpdModuleIdentification(String baseName, String guid, String arch){\r
45 this.baseName = baseName;\r
46 this.guid = guid;\r
47 this.arch = arch;\r
48 }\r
49 \r
50 /**\r
51 Override java.lang.Object#equals. \r
52 \r
53 <p>Currently, use BaseName and ARCH to identify a module. It will enhance\r
54 in the next version. </p>\r
55 \r
56 @see java.lang.Object#equals(java.lang.Object)\r
57 **/\r
58 public boolean equals(Object obj) {\r
59 if (obj instanceof FpdModuleIdentification) {\r
60 FpdModuleIdentification moduleIdObj = (FpdModuleIdentification)obj;\r
61 if ( baseName.equalsIgnoreCase(moduleIdObj.baseName) && arch.equalsIgnoreCase(moduleIdObj.arch)) {\r
62 return true;\r
63 }\r
64 // TBD\r
65 return false;\r
66 }\r
67 else {\r
68 return super.equals(obj);\r
69 }\r
70 }\r
71 \r
72 public void setArch(String arch) {\r
73 this.arch = arch;\r
74 }\r
75\r
76 public void setFvBinding(String fvBinding) {\r
77 this.fvBinding = fvBinding;\r
78 }\r
79\r
80 public void setSequence(String sequence) {\r
81 this.sequence = sequence;\r
82 }\r
83\r
84 public String toString(){\r
85 return arch + ":" + guid + "_" + baseName;\r
86 }\r
87\r
88 public void setBaseName(String baseName) {\r
89 this.baseName = baseName;\r
90 }\r
91\r
92 public void setGuid(String guid) {\r
93 this.guid = guid;\r
94 }\r
95\r
96 public void setPackageName(String packageName) {\r
97 this.packageName = packageName;\r
98 }\r
99\r
100 public void setVersion(String version) {\r
101 this.version = version;\r
102 }\r
103\r
104 public String getArch() {\r
105 return arch;\r
106 }\r
107\r
108 public String getBaseName() {\r
109 return baseName;\r
110 }\r
111\r
112 public String getFvBinding() {\r
113 return fvBinding;\r
114 }\r
115\r
116 public String getGuid() {\r
117 return guid;\r
118 }\r
119\r
120 public String getPackageName() {\r
121 return packageName;\r
122 }\r
123\r
124 public String getSequence() {\r
125 return sequence;\r
126 }\r
127\r
128 public String getVersion() {\r
129 return version;\r
130 }\r
131}\r