* string with the name for this <code>Type</code>
*/
protected AbstractBaseType(String pkName, String name) {
+ if (pkName == null) {
+ throw new IllegalArgumentException("Package Name for Generated Type cannot be null!");
+ }
+ if (name == null) {
+ throw new IllegalArgumentException("Name of Generated Type cannot be null!");
+ }
this.packageName = pkName;
this.name = name;
}
@Override
public boolean equals(Object obj) {
- if (this == obj)
+ if (this == obj) {
return true;
- if (obj == null)
+ }
+ if (obj == null) {
return false;
- if (getClass() != obj.getClass())
+ }
+ if (false ==(obj instanceof Type)) {
return false;
+ }
Type other = (Type) obj;
if (name == null) {
- if (other.getName() != null)
+ if (other.getName() != null) {
return false;
- } else if (!name.equals(other.getName()))
+ }
+ } else if (!name.equals(other.getName())) {
return false;
+ }
if (packageName == null) {
- if (other.getPackageName() != null)
+ if (other.getPackageName() != null) {
return false;
- } else if (!packageName.equals(other.getPackageName()))
+ }
+ } else if (!packageName.equals(other.getPackageName())) {
return false;
+ }
return true;
}