Class FieldUtils2


  • public final class FieldUtils2
    extends java.lang.Object
    Add features missing in org.apache.commons.lang.reflect.FieldUtils.
    Since:
    2.14
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.util.List<java.lang.reflect.Field> getFields​(java.lang.Class clazz, boolean forceAccess)
      Get accessible Field breaking scope if requested.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Method Detail

      • getFields

        public static java.util.List<java.lang.reflect.Field> getFields​(java.lang.Class clazz,
                                                                        boolean forceAccess)
        Get accessible Field breaking scope if requested. Superclasses/interfaces are considered.
        Parameters:
        clazz - the class to reflect, must not be null
        forceAccess - whether to break scope restrictions using the setAccessible method. False only matches public fields.