1 22 23 package org.objectweb.petals.tools.jbicommon.descriptor; 24 25 import java.util.List ; 26 27 import org.apache.commons.lang.builder.EqualsBuilder; 28 import org.apache.commons.lang.builder.HashCodeBuilder; 29 import org.apache.commons.lang.builder.ToStringBuilder; 30 31 39 public class SharedLibrary { 40 41 44 private Identification identification; 45 46 50 private String classLoaderDelegation; 52 55 private String version; 56 57 60 private List <String > sharedLibraryClassPath; 62 65 public SharedLibrary() { super(); 67 } 68 69 @Override 70 public boolean equals(final Object other) { 71 if (!(other instanceof SharedLibrary)) { 72 return false; } 74 SharedLibrary castOther = (SharedLibrary) other; 75 return new EqualsBuilder().append(identification, 76 castOther.identification).append(classLoaderDelegation, 77 castOther.classLoaderDelegation).append(version, 78 castOther.version).append(sharedLibraryClassPath, 79 castOther.sharedLibraryClassPath).isEquals(); 80 } 81 82 92 public String getClassLoaderDelegation() { 93 return classLoaderDelegation; 94 } 95 96 103 public Identification getIdentification() { 104 return identification; 105 } 106 107 111 114 public List <String > getSharedLibraryClassPath() { 115 return sharedLibraryClassPath; 116 } 117 118 121 public String getVersion() { 122 return version; 123 } 124 125 @Override 126 public int hashCode() { 127 return new HashCodeBuilder().append(identification).append( 128 classLoaderDelegation).append(version).append( 129 sharedLibraryClassPath).toHashCode(); 130 } 131 132 @Override 133 public String toString() { 134 return new ToStringBuilder(this).append("identification", 135 identification).append("classLoaderDelegation", 136 classLoaderDelegation).append("version", version).append( 137 "sharedLibraryClassPath", sharedLibraryClassPath).toString(); 138 } 139 140 147 protected void setClassLoaderDelegation(final String delegationModel) { 148 this.classLoaderDelegation = delegationModel; 149 } 150 151 159 protected void setIdentification(final Identification identification) { 160 this.identification = identification; 161 } 162 163 167 protected void setSharedLibraryClassPath(final List <String > sharedLibCP) { 168 this.sharedLibraryClassPath = sharedLibCP; 169 } 170 171 175 protected void setVersion(final String version) { 176 this.version = version; 177 } 178 } 179 | Popular Tags |