Exemple #1
0
 @Override
 public boolean equals(Object obj) {
   if (this == obj) return true;
   if (obj == null) return false;
   if (getClass() != obj.getClass()) return false;
   AbstractJavaSource<?> other = (AbstractJavaSource<?>) obj;
   if (body == null) {
     if (other.body != null) return false;
   } else if (!body.equals(other.body)) return false;
   if (document == null) {
     if (other.document != null) return false;
   } else if (!document.equals(other.document)) return false;
   if (enclosingType == null) {
     if (other.enclosingType != null) return false;
   } else if (!enclosingType.equals(other.enclosingType)) return false;
   if (unit == null) {
     if (other.unit != null) return false;
   } else if (!unit.equals(other.unit)) return false;
   return true;
 }