code: public static Optional<Method> getReadMethod(Field field) {
          String fieldName = field.getName();
          Class<?> fieldClass = field.getDeclaringClass();
          String capitalizedFieldName = fieldName.substring(0, 1).toUpperCase(ENGLISH) + fieldName.substring(1);
          // try to find getProperty
          Optional<Method> getter = getPublicMethod("get" + capitalizedFieldName, fieldClass);
          if (getter.isPresent()) {
              return getter;
          }
          // try to find isProperty for boolean properties
          return getPublicMethod("is" + capitalizedFieldName, fieldClass);
      }
docs: Get the read method for given field.
  @param field field to get the read method for.
  @return Optional of read method or empty if field has no read method