Tests two class names for equality, taking partical class names (no package given) into account.

@param name1 the first class name to compare.
@param name2 the second class name to compare.
@return true if the class names match, false otherwise.
426075
protected boolean classNamesMatch(final String name1, final String name2) {
		if (name1 == null || name2 == null) {
			return false;
		}
		int index1 = name1.lastIndexOf('.');
		int index2 = name2.lastIndexOf('.');
		if (index1 == -1 && index2 != -1) {
			return Util.equals(name1, name2.substring(index2 + 1));
		} else if (index1 != -1 && index2 == -1) {
			return Util.equals(name1.substring(index1 + 1), name2);
		} else {
			return Util.equals(name1, name2);
		}
	}
571492
public boolean isSuperClass(Class<?> other) {
      Class<?> s = other.getSuperclass();
      while (s != null) {
         if ((getClassWeAreModelling() == s) || (getClassWeAreModelling().getName().equals(s.getName()))) {
            return true;
         }
         s = s.getSuperclass();
      }
      return false;
   }
58859
public boolean containsName(final String name) {
        for (final T i : this) {
            if (i.getName().equals(name)) {
                return true;
            }
        }
        return false;
    }
544249
@Override
  public boolean doIsEquals(NormalAnnotationExpr first, NormalAnnotationExpr second) {

    boolean equals = true;

    if (!first.getName().equals(second.getName())) equals = false;

    if (equals == true) {

      if (first.getPairs() == null) return second.getPairs() == null;

      if (!isSmallerHasEqualsInBigger(first.getPairs(), second.getPairs(), true)) return false;

    }

    return equals;
  }
184958
private static boolean isEqual(String string1, String string2) {
        return (string1 == null && string2 == null) || (string1 != null && string1.equals(string2));
    }
548662
public static boolean areEquals(final String s1, final String s2) {
        return s1 == null ? s2 == null : s1.equals(s2);
    }
530712
private static boolean equalsQualifiedName(PDescriptor a, PDescriptor b) {
        return (a != null) && (b != null) && (a.getQualifiedName()
                                               .equals(b.getQualifiedName()));
    }
1255447
public static boolean matchesTypeName(Class<?> clazz, String typeName) {
		return (typeName != null &&
				(typeName.equals(clazz.getName()) || typeName.equals(clazz.getSimpleName()) ||
				(clazz.isArray() && typeName.equals(getQualifiedNameForArray(clazz)))));
	}
33335
public static boolean nullSafeEquals(final Object obj1, final Object obj2) {
        return ((obj1 == null && obj2 == null)
                || (obj1 != null && obj2 != null && obj1.equals(obj2)));
    }
951514
public boolean containsMethod(final String name) {
      if (StringUtils.isNullOrBlank(name)) {
         return false;
      }
      return ClassDescriptorCache.getInstance()
                                 .getClassDescriptor(clazz)
                                 .getMethods(accessAll)
                                 .stream()
                                 .anyMatch(f -> f.getName().equals(name));
   }
963091
public static boolean isSameType(@Nonnull TypeMirror t1, @Nonnull TypeMirror t2) {
        String t1Name = toUniqueString(t1);
        String t2Name = toUniqueString(t2);

        return t1Name.equals(t2Name);
    }
636204
private static boolean classNameMatchesFileName(ClassSymbol c,
                                                        Env<AttrContext> env) {
            return env.toplevel.sourcefile.isNameCompatible(c.name.toString(),
                                                            JavaFileObject.Kind.SOURCE);
        }
373050
public static boolean areEqual(Object o1, Object o2) {
        return
            !o1.getClass().isArray() ? o1.equals(o2) :
                o1.getClass() == boolean[].class ? Arrays.equals((boolean[]) o1, (boolean[]) o2) :
                    o1.getClass() == byte[].class ? Arrays.equals((byte[]) o1, (byte[]) o2) :
                        o1.getClass() == char[].class ? Arrays.equals((char[]) o1, (char[]) o2) :
                            o1.getClass() == double[].class ? Arrays.equals(
                                (double[]) o1,
                                (double[]) o2
                            ) :
                                o1.getClass() == float[].class ? Arrays.equals(
                                    (float[]) o1,
                                    (float[]) o2
                                ) :
                                    o1.getClass() == int[].class ? Arrays.equals(
                                        (int[]) o1,
                                        (int[]) o2
                                    ) :
                                        o1.getClass() == long[].class ? Arrays.equals(
                                            (long[]) o1,
                                            (long[]) o2
                                        ) :
                                            o1.getClass() == short[].class ? Arrays.equals(
                                                (short[]) o1,
                                                (short[]) o2
                                            ) :
                                                Arrays.equals(
                                                    (Object[]) o1,
                                                    (Object[]) o2
                                                );
    }
1373200
private boolean areClassesEqual(Class<?> c1, Class<?> c2) {
        if (isMap(c1)) {
            return isMap(c2);
        } else if (isList(c1)) {
            return isList(c2);
        } else {
            return c1.equals(c2);
        }
    }
1073002
private static boolean hasConflictingClassName(DescriptorProto messageDesc, String name) {
    if (name.equals(messageDesc.getName())) {
      return true;
    }
    for (EnumDescriptorProto enumDesc : messageDesc.getEnumTypeList()) {
      if (name.equals(enumDesc.getName())) {
        return true;
      }
    }
    for (DescriptorProto nestedMessageDesc : messageDesc.getNestedTypeList()) {
      if (hasConflictingClassName(nestedMessageDesc, name)) {
        return true;
      }
    }
    return false;
  }
1031354
public static boolean matchesTypeName(Class<?> clazz, String typeName) {
        return (typeName != null &&
                (typeName.equals(clazz.getTypeName()) || typeName.equals(clazz.getSimpleName())));
    }
848897
public static boolean equal(Object obj1, Object obj2) {
//		return (obj1 != null) ? (obj1.equals(obj2)) : (obj2 == null);
		return (obj1 == obj2) || (obj1 != null && obj1.equals(obj2));
	}