public static void throwExceptionIfFieldWasNotFound ( Class < ? > type , String fieldName , Field field ) { if ( field == null ) { throw new FieldNotFoundException ( "No field was found with name '" + fieldName + "' in class " + type . getName ( ) + "." ) ; } }
Throw exception if field was not found .