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