question: static ArrayList < Field > allFields ( final Class < ? > clazz ) { final ArrayList < Field > res = new ArrayList < > ( ) ; Class < ? > cl = clazz ; while ( cl != null ) { final Field [ ] fields = cl . getDeclaredFields ( ) ; Collections . addAll ( res , fields ) ; cl = cl . getSuperclass ( ) ; } return res ; }
target:  Get all the fields in this class and its super-classes.