Top Description Constructors Methods
com.google.auto.value.processor

pack-priv Class PropertyNames

extends Object
Class Inheritance
Imports
com.google.common.base.Strings

Helper methods to create property names.

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
pack-priv static String
decapitalizeLikeJavaBeans(String propertyName)

Returns the propertyName with its first character in lower case, but leaves it intact if it starts with two capitals.

pack-priv static String
decapitalizeNormally(String propertyName)

Returns the propertyName with its first character in lower case.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

PropertyNamesback to summary
pack-priv PropertyNames()

Method Detail

decapitalizeLikeJavaBeansback to summary
pack-priv static String decapitalizeLikeJavaBeans(String propertyName)

Returns the propertyName with its first character in lower case, but leaves it intact if it starts with two capitals.

For consistency with JavaBeans, a getter called getHTMLPage() defines a property called HTMLPage. The rule is: the name of the property is the part after get or is, with the first letter lowercased unless the first two letters are uppercase. This works well for the HTMLPage example, but in these more enlightened times we use HtmlPage anyway, so the special behaviour is not useful, and of course it behaves poorly with examples like OAuth. Nevertheless, we preserve it for compatibility.

decapitalizeNormallyback to summary
pack-priv static String decapitalizeNormally(String propertyName)

Returns the propertyName with its first character in lower case.