code: private static Method getReadMethod(Object object, String propertyName) {
          String getMethodName = "get" + propertyName.substring(0, 1).toUpperCase(Locale.ENGLISH)
              + propertyName.substring(1);
          String isMethodName = "is" + propertyName.substring(0, 1).toUpperCase(Locale.ENGLISH)
              + propertyName.substring(1);
  
          Method[] methods = getMethods(object);
  
          for (Method method : methods) {
              if ((method.getName().equals(getMethodName) || method.getName().equals(isMethodName)) && (method
                  .getParameterTypes().length == 0)) {
                  return method;
              }
          }
          return null;
      }
docs: Tries to find the Java method to read a given propertyName for the given object.
  @param object the object whose class will be examined
  @param propertyName the property name for which the read method should be searched
  @return the {@link Method} if found, null in all other cases.