Package org.apache.groovy.util

# Class BeanUtils

java.lang.Object
org.apache.groovy.util.BeanUtils

public class BeanUtils extends Object

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static String`
  `capitalize(String property)`
  This is the complement the behavior of the decapitalize(String) method.
  `static String`
  `decapitalize(String property)`
  Returns a string which is the same as the original except the first letter will be lowercase except for some special cases as per JavaBean handling.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Method Details

  - ### decapitalize

    public static String decapitalize(String property)
    Returns a string which is the same as the original except the first letter will be lowercase except for some special cases as per JavaBean handling. In particular, if the first two letters are both uppercase, e.g. URL, then no change of case occurs.

    Originally inspired by the method with the same name in `Introspector`.

    Parameters:
      `property` - a string representing the name of a JavaBean-like property
    Returns:
      the decapitalized string
    Since:
      3.0.0
    See Also:
      - A relevant stack overflow question

  - ### capitalize

    public static String capitalize(String property)
    This is the complement the behavior of the decapitalize(String) method. We handle names that begin with an initial lowerCase followed by upperCase with special JavaBean behavior (which is to make no change). See GROOVY-3211.
    Parameters:
      `property` - the property name to capitalize
    Returns:
      the name capitalized, except when we don't
    Since:
      3.0.0