code: 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() + ".");
          }
      }
docs: Throw exception if field was not found.
  
  @param type      the type
  @param fieldName the field name
  @param field     the field