Class BeanUtil

java.lang.Object
ch.qos.logback.core.joran.util.beans.BeanUtil

public class BeanUtil extends Object
Encapsulates utility methods associated with standard java beans.
Author:
urechm
  • Field Details

  • Constructor Details

  • Method Details

    • isAdder

      public static boolean isAdder(Method method)
      Parameters:
      method - to check if it is an 'adder' method.
      Returns:
      true if the given method is an 'adder' method.
    • isGetter

      public static boolean isGetter(Method method)
      Parameters:
      method - to check if it is a standard java beans getter.
      Returns:
      true if the given method is a standard java beans getter.
    • isSetter

      public static boolean isSetter(Method method)
      Parameters:
      method - to check if it is a standard java beans setter.
      Returns:
      true if the given method is a standard java beans setter.
    • getPropertyName

      public static String getPropertyName(Method method)
      Parameters:
      method - to get the associated property name for.
      Returns:
      The property name of the associated property if the given method matches a standard java beans getter or setter.
    • toLowerCamelCase

      public static String toLowerCamelCase(String string)
      Converts the given String into lower camel case form.
      Parameters:
      string - to decapitalize.
      Returns:
      null if the given String is null. Emtpy string if the given string is empty. The given string if the first two consecutive letters are in upper case. The given string with the first letter in lower case otherwise, which might be the given string.