return the field for the specified name . java reflection will either give you all the public fields all the way up the class hierarchy getfield , or will give you all the private/protected/public only in the single class getdeclaredfield . this method uses the latter but walks up the class hierarchy . concode_field_sep PlaceHolder placeHolder concode_field_sep Class<T> findActualClassParameter concode_elem_sep Class findMethodParameterClass concode_elem_sep Class findMethodOutputClass concode_elem_sep double asDouble concode_elem_sep Class findActualFieldClass
Field function ( Object arg0 , String arg1 ) { Class loc0 = arg0 . getClass ( ) ; Field loc1 = null ; do { try { loc1 = loc0 . getDeclaredField ( arg1 ) ; loc1 . setAccessible ( true ) ; return loc1 ; } catch ( NoSuchFieldException loc2 ) { } loc0 = loc0 . getSuperclass ( ) ; } while ( loc0 != Object . class ) ; return null ; }