code: private static void reflectionAppend(
          final Object lhs,
          final Object rhs,
          final Class<?> clazz,
          final EqualsBuilder builder,
          final boolean useTransients,
          final String[] excludeFields) {
  
          if (isRegistered(lhs, rhs)) {
              return;
          }
  
          try {
              register(lhs, rhs);
              final Field[] fields = clazz.getDeclaredFields();
              AccessibleObject.setAccessible(fields, true);
              for (int i = 0; i < fields.length && builder.isEquals; i++) {
                  final Field f = fields[i];
                  if (false == ArrayUtil.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 (final 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");
                      }
                  }
              }
          } finally {
              unregister(lhs, rhs);
          }
      }
docs: <p>Appends the fields and values defined by the given object of the
  given Class.</p>
  
  @param lhs  the left hand object
  @param rhs  the right hand object
  @param clazz  the class to append details of
  @param builder  the builder to append to
  @param useTransients  whether to test transient fields
  @param excludeFields  array of field names to exclude from testing