1 42 43 package org.jfree.xml.generator.model; 44 45 import java.util.Arrays ; 46 47 55 public class MultiplexMappingInfo { 56 57 58 private Class baseClass; 59 60 61 private String typeAttribute; 62 63 64 private TypeInfo[] childClasses; 65 66 67 private Comments comments; 68 69 70 private String source; 71 72 77 public MultiplexMappingInfo(final Class baseClass) { 78 this(baseClass, "type"); 79 } 80 81 87 public MultiplexMappingInfo(final Class baseClass, final String typeAttribute) { 88 if (baseClass == null) { 89 throw new NullPointerException ("BaseClass"); 90 } 91 if (typeAttribute == null) { 92 throw new NullPointerException ("TypeAttribute"); 93 } 94 this.baseClass = baseClass; 95 this.typeAttribute = typeAttribute; 96 } 97 98 103 public Class getBaseClass() { 104 return this.baseClass; 105 } 106 107 112 public String getTypeAttribute() { 113 return this.typeAttribute; 114 } 115 116 121 public TypeInfo[] getChildClasses() { 122 return this.childClasses; 123 } 124 125 130 public void setChildClasses(final TypeInfo[] childClasses) { 131 this.childClasses = childClasses; 132 } 133 134 139 public Comments getComments() { 140 return this.comments; 141 } 142 143 148 public void setComments(final Comments comments) { 149 this.comments = comments; 150 } 151 152 157 public String getSource() { 158 return this.source; 159 } 160 161 166 public void setSource(final String source) { 167 this.source = source; 168 } 169 170 177 public boolean equals(final Object o) { 178 if (this == o) { 179 return true; 180 } 181 if (!(o instanceof MultiplexMappingInfo)) { 182 return false; 183 } 184 185 final MultiplexMappingInfo multiplexMappingInfo = (MultiplexMappingInfo) o; 186 187 if (!this.baseClass.equals(multiplexMappingInfo.baseClass)) { 188 return false; 189 } 190 if (!Arrays.equals(this.childClasses, multiplexMappingInfo.childClasses)) { 191 return false; 192 } 193 if (!this.typeAttribute.equals(multiplexMappingInfo.typeAttribute)) { 194 return false; 195 } 196 197 return true; 198 } 199 200 205 public int hashCode() { 206 int result; 207 result = this.baseClass.hashCode(); 208 result = 29 * result + this.typeAttribute.hashCode(); 209 return result; 210 } 211 212 } 213 | Popular Tags |