public static Field getField ( Class < ? > type , String fieldName ) { Field field = null ; try { //get field field = type . getDeclaredField ( fieldName ) ; } catch ( Exception exception ) { throw new FaxException ( "Unable to extract field: " + fieldName + " from type: " + type , exception ) ; } //set accessible field . setAccessible ( true ) ; return field ; }
This function returns the field wrapper for the requested field