+++ /dev/null
-/** @file\r
- Java class FpdModuleIdentification is used to present a module identification\r
- from BaseName, GUID, Version, PackageName, and ARCH. \r
- \r
-Copyright (c) 2006, Intel Corporation\r
-All rights reserved. This program and the accompanying materials\r
-are licensed and made available under the terms and conditions of the BSD License\r
-which accompanies this distribution. The full text of the license may be found at\r
-http://opensource.org/licenses/bsd-license.php\r
-\r
-THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS,\r
-WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.\r
-**/\r
-package org.tianocore.build.id;\r
-\r
-\r
-/**\r
- This class is used to identify a module with Module Guid, Module Version, \r
- Package Guid, Package Version and Arch. \r
- \r
- @since GenBuild 1.0\r
-**/\r
-public class FpdModuleIdentification {\r
- \r
- private String arch;\r
- \r
- private String fvBinding = "NULL"; // Optional\r
- \r
- private ModuleIdentification module;\r
- \r
- /**\r
- Constructor Method. \r
- \r
- @param arch Build Arch\r
- @param fvBinding Belong to what FVs\r
- @param module ModuleIdentification\r
- **/\r
- public FpdModuleIdentification(String arch, String fvBinding, ModuleIdentification module){\r
- this.arch = arch;\r
- this.fvBinding = fvBinding;\r
- this.module = module;\r
- }\r
- \r
- /**\r
- Constructor Method. \r
- \r
- @param arch Build Arch\r
- @param module ModuleIdentification\r
- **/\r
- public FpdModuleIdentification(ModuleIdentification module, String arch){\r
- this.arch = arch;\r
- this.module = module;\r
- }\r
- /**\r
- Override java.lang.Object#equals. \r
- \r
- <p>Currently, use BaseName and ARCH to identify a module. It will enhance\r
- in the next version. </p>\r
- \r
- @see java.lang.Object#equals(java.lang.Object)\r
- **/\r
- public boolean equals(Object obj) {\r
- if (obj instanceof FpdModuleIdentification) {\r
- FpdModuleIdentification moduleIdObj = (FpdModuleIdentification)obj;\r
- if ( module.equals(moduleIdObj.module) && arch.equalsIgnoreCase(moduleIdObj.arch)) {\r
- return true;\r
- }\r
- return false;\r
- }\r
- else {\r
- return false;\r
- }\r
- }\r
-\r
- /**\r
- @param fvBinding\r
- **/\r
- public void setFvBinding(String fvBinding) {\r
- this.fvBinding = fvBinding;\r
- }\r
-\r
- /* (non-Javadoc)\r
- @see java.lang.Object#toString()\r
- **/\r
- public String toString(){\r
- return arch + ":" + module;\r
- }\r
-\r
- /**\r
- @return String fvBinding\r
- **/\r
- public String getFvBinding() {\r
- return fvBinding;\r
- }\r
-\r
- /**\r
- @return ModuleIdentification module ID\r
- **/\r
- public ModuleIdentification getModule() {\r
- return module;\r
- }\r
-\r
- /**\r
- @param module Module Identification\r
- **/\r
- public void setModule(ModuleIdentification module) {\r
- this.module = module;\r
- }\r
-\r
- /**\r
- @return String arch\r
- **/\r
- public String getArch() {\r
- return arch;\r
- }\r
-\r
- /**\r
- @param arch build ARCH\r
- **/\r
- public void setArch(String arch) {\r
- this.arch = arch;\r
- }\r
- \r
- /* (non-Javadoc)\r
- @see java.lang.Object#hashCode()\r
- **/\r
- public int hashCode(){\r
- return module.hashCode();\r
- }\r
-}\r