private static void reflectionAppend(
        Object lhs,
        Object rhs,
        Class<?> clazz,
        CompareToBuilder builder,
        boolean useTransients,
        String[] excludeFields) {
        
        Field[] fields = clazz.getDeclaredFields();
        AccessibleObject.setAccessible(fields, true);
        for (int i = 0; i < fields.length && builder.comparison == 0; i++) {
            Field f = fields[i];
            if (!ArrayUtils.contains(excludeFields, f.getName())
                && (f.getName().indexOf('$') == -1)
                && (useTransients || !Modifier.isTransient(f.getModifiers()))
                && (!Modifier.isStatic(f.getModifiers()))) {
                try {
                    builder.append(f.get(lhs), f.get(rhs));
                } catch (IllegalAccessException e) {
                    // This can't happen. Would get a Security exception instead.
                    // Throw a runtime exception in case the impossible happens.
                    throw new InternalError("Unexpected IllegalAccessException");
                }
            }
        }
    }
<p>Appends to <code>builder</code> the comparison of <code>lhs</code>
to <code>rhs</code> using the fields defined in <code>clazz</code>.</p>

@param lhs  left-hand object
@param rhs  right-hand object
@param clazz  <code>Class</code> that defines fields to be compared
@param builder  <code>CompareToBuilder</code> to append to
@param useTransients  whether to compare transient fields
@param excludeFields  fields to exclude
android/android_framework/base/src/main/java/lang3/builder/CompareToBuilder.java