public static List < Field > getAllFields ( Class < ? > clas ) { JK . fixMe ( "add caching.." ) ; List < Field > list = new Vector <> ( ) ; // start by fields from the super class if ( clas . getSuperclass ( ) != null ) { list . addAll ( getAllFields ( clas . getSuperclass ( ) ) ) ; } Field [ ] fields = clas . getDeclaredFields ( ) ; for ( Field field : fields ) { if ( ! Modifier . isStatic ( field . getModifiers ( ) ) ) { list . add ( field ) ; } } return list ; }
Gets the all fields .