public static InstanceFields allDeclaredFieldsOf ( Object instance ) { List < InstanceField > instanceFields = new ArrayList < InstanceField > ( ) ; for ( Class < ? > clazz = instance . getClass ( ) ; clazz != Object . class ; clazz = clazz . getSuperclass ( ) ) { instanceFields . addAll ( instanceFieldsIn ( instance , clazz . getDeclaredFields ( ) ) ) ; } return new InstanceFields ( instance , instanceFields ) ; }
Instance fields declared in the class and superclasses of the given instance .