Your browser does not support JavaScript and this site utilizes JavaScript to build content and provide links to additional information. You should either enable JavaScript in your browser settings or use a browser that supports JavaScript in order to take full advantage of this site.
1 43 44 package org.jfree.xml.generator.model; 45 46 49 public class ClassDescription { 50 51 52 private PropertyInfo[] properties; 53 54 55 private TypeInfo[] constructorDescription; 56 57 58 private Class objectClass; 59 60 61 private String description; 62 63 64 private String registerKey; 65 66 67 private Class superClass; 68 69 70 private boolean preserve; 71 72 73 private Comments comments; 74 75 76 private String source; 77 78 83 public ClassDescription(final Class objectClass) { 84 if (objectClass == null) { 85 throw new NullPointerException (); 86 } 87 this.objectClass = objectClass; 88 } 89 90 95 public PropertyInfo[] getProperties() { 96 return this.properties; 97 } 98 99 104 public void setProperties(final PropertyInfo[] properties) { 105 this.properties = properties; 106 } 107 108 113 public Class getObjectClass() { 114 return this.objectClass; 115 } 116 117 122 public String getDescription() { 123 return this.description; 124 } 125 126 131 public void setDescription(final String description) { 132 this.description = description; 133 } 134 135 140 public String getName() { 141 if (getObjectClass() == null) { 142 return null; 143 } 144 return getObjectClass().getName(); 145 } 146 147 152 public Class getSuperClass() { 153 return this.superClass; 154 } 155 156 161 public void setSuperClass(final Class superClass) { 162 this.superClass = superClass; 163 } 164 165 170 public boolean isPreserve() { 171 return this.preserve; 172 } 173 174 179 public void setPreserve(final boolean preserve) { 180 this.preserve = preserve; 181 } 182 183 188 public String getRegisterKey() { 189 return this.registerKey; 190 } 191 192 197 public void setRegisterKey(final String registerKey) { 198 this.registerKey = registerKey; 199 } 200 201 206 public TypeInfo[] getConstructorDescription() { 207 return this.constructorDescription; 208 } 209 210 215 public void setConstructorDescription(final TypeInfo[] constructorDescription) { 216 this.constructorDescription = constructorDescription; 217 } 218 219 226 public PropertyInfo getProperty (final String name) { 227 if (this.properties == null) { 228 return null; 229 } 230 for (int i = 0; i < this.properties.length; i++) { 231 if (this.properties[i].getName().equals(name)) { 232 return this.properties[i]; 233 } 234 } 235 return null; 236 } 237 238 243 public boolean isUndefined() { 244 if (this.properties != null) { 245 if (this.properties.length > 0) { 246 return false; 247 } 248 } 249 if (isPreserve()) { 250 return false; 251 } 252 if (getRegisterKey() != null) { 253 return false; 254 } 255 if (getConstructorDescription() != null) { 256 if (getConstructorDescription().length > 0) { 257 return false; 258 } 259 } 260 return true; 261 } 262 263 268 public Comments getComments() { 269 return this.comments; 270 } 271 272 277 public void setComments(final Comments comments) { 278 this.comments = comments; 279 } 280 281 286 public String getSource() { 287 return this.source; 288 } 289 290 295 public void setSource(final String source) { 296 this.source = source; 297 } 298 299 } 300 301
| Popular Tags
|