public static <T> int reflectionHashCode(int initialNonZeroOddNumber, int multiplierNonZeroOddNumber, T object,
            boolean testTransients, Class<? super T> reflectUpToClass, String... excludeFields) {

        if (object == null) {
            throw new IllegalArgumentException("The object to build a hash code for must not be null");
        }
        HashCodeBuilder builder = new HashCodeBuilder(initialNonZeroOddNumber, multiplierNonZeroOddNumber);
        Class<?> clazz = object.getClass();
        reflectionAppend(object, clazz, builder, testTransients, excludeFields);
        while (clazz.getSuperclass() != null && clazz != reflectUpToClass) {
            clazz = clazz.getSuperclass();
            reflectionAppend(object, clazz, builder, testTransients, excludeFields);
        }
        return builder.toHashCode();
    }
<p>
This method uses reflection to build a valid hash code.
</p>

<p>
It uses <code>AccessibleObject.setAccessible</code> to gain access to private fields. This means that it will
throw a security exception if run under a security manager, if the permissions are not set up correctly. It is
also not as efficient as testing explicitly.
</p>

<p>
If the TestTransients parameter is set to <code>true</code>, transient members will be tested, otherwise they
are ignored, as they are likely derived fields, and not part of the value of the <code>Object</code>.
</p>

<p>
Static fields will not be included. Superclass fields will be included up to and including the specified
superclass. A null superclass is treated as java.lang.Object.
</p>

<p>
Two randomly chosen, non-zero, odd numbers must be passed in. Ideally these should be different for each class,
however this is not vital. Prime numbers are preferred, especially for the multiplier.
</p>

@param <T>
           the type of the object involved
@param initialNonZeroOddNumber
           a non-zero, odd number used as the initial value
@param multiplierNonZeroOddNumber
           a non-zero, odd number used as the multiplier
@param object
           the Object to create a <code>hashCode</code> for
@param testTransients
           whether to include transient fields
@param reflectUpToClass
           the superclass to reflect up to (inclusive), may be <code>null</code>
@param excludeFields
           array of field names to exclude from use in calculation of hash code
@return int hash code
@throws IllegalArgumentException
            if the Object is <code>null</code>
@throws IllegalArgumentException
            if the number is zero or even
@since 2.0
android/android_framework/base/src/main/java/lang3/builder/HashCodeBuilder.java