public static Collection < Field > getAllAttributes ( final Class < ? > classToInspect ) { Set < Field > allFields = new HashSet <> ( ) ; getAllAttributes ( classToInspect , allFields , Function . identity ( ) , field -> true ) ; return allFields ; }
Inspects the object and all superclasses for public non - final accessible methods and returns a collection containing all the attributes found .