/** * Determine if the given class defines a {@link Object#hashCode} override. * * @param clazz The class to check * @return True if clazz defines an hashCode override. */ public static boolean overridesHashCode(Class clazz) { Method hashCode; try { hashCode = extractHashCodeMethod( clazz ); } catch ( NoSuchMethodException nsme ) { return false; //its an interface so we can't really tell anything... } return !OBJECT_HASHCODE.equals( hashCode ); }
/** * Determine if the given class defines a {@link Object#hashCode} override. * * @param clazz The class to check * @return True if clazz defines an hashCode override. */ public static boolean overridesHashCode(Class clazz) { Method hashCode; try { hashCode = extractHashCodeMethod( clazz ); } catch ( NoSuchMethodException nsme ) { return false; //its an interface so we can't really tell anything... } return !OBJECT_HASHCODE.equals( hashCode ); }
/** * Determine if the given class defines a {@link Object#hashCode} override. * * @param clazz The class to check * @return True if clazz defines an hashCode override. */ public static boolean overridesHashCode(Class clazz) { Method hashCode; try { hashCode = extractHashCodeMethod( clazz ); } catch ( NoSuchMethodException nsme ) { return false; //its an interface so we can't really tell anything... } return !OBJECT_HASHCODE.equals( hashCode ); }
/** * Determine if the given class defines a {@link Object#hashCode} override. * * @param clazz The class to check * @return True if clazz defines an hashCode override. */ public static boolean overridesHashCode(Class clazz) { Method hashCode; try { hashCode = extractHashCodeMethod( clazz ); } catch ( NoSuchMethodException nsme ) { return false; //its an interface so we can't really tell anything... } return !OBJECT_HASHCODE.equals( hashCode ); }