MCPcopy Create free account
hub / github.com/apache/groovy / getGetterName

Method getGetterName

src/main/java/groovy/lang/MetaProperty.java:102–105  ·  view source on GitHub ↗

Gets the name for the getter for this property @return The name of the property. The name is "get" + the capitalized propertyName or, in the case of boolean values, "is" + the capitalized propertyName

(final String propertyName, final Class type)

Source from the content-addressed store, hash-verified

100 * or, in the case of boolean values, "is" + the capitalized propertyName
101 */
102 public static String getGetterName(final String propertyName, final Class type) {
103 String prefix = type == Boolean.TYPE ? "is" : "get";
104 return prefix + capitalize(propertyName);
105 }
106
107 /**
108 * Gets the setter for the getter for this property.

Callers 1

getGetterNameMethod · 0.95

Calls 1

capitalizeMethod · 0.45

Tested by

no test coverage detected