code: public static boolean hasBeanMethods(Class<?> type, String propertyName, Class<?> propertyType, boolean caseSensitive) {
          try {
              // if this succeeds without an exception, then the properties exist!
              @SuppressWarnings("unused")
              Method[] methods = getBeanMethods(type, propertyName, propertyType, caseSensitive);
              return true;
          } catch (Exception e) {
              return false;
          }
      }
docs: Checks if the class implements public "bean" methods (get and set) for the
  name. For example, for a name such as "firstName", this method will
  check if the class has both getFirstName() and setFirstName() methods.
  Also, this method will validate the return type matches the paramType
  on the getXXX() method and that the setXXX() method only accepts that
  paramType.  The search is optionally case sensitive.
  @param type The class to search
  @param propertyName The property name to search for, if "firstName", then
  this method will internally add the "get" and "set" to the beginning.
  @param propertyType The class type of the property
  @param caseSensitive If the search is case sensitive or not
  @return True if the "bean" methods are correct, otherwise false.