public static class NamingConventions.UpperCamelCase extends NamingConventions.CamelCase
E.g. "MyXmlParser" and "MyXMLParser". Note that both examples are valid upper camel case forms. The first one takes abbreviations as any other words where the first letter is upper case, and the rest are lower case (hence - "Xml"), while the latter upper cases all letters of an abbreviation (hence - "XML").
Additionally, many different Java naming conventions introduce prefixes for field naming, some examples:
Those prefixes can be supported. For example, if this convention is configured withignorablePrefixes
set to "_" then a field named "_MyXmlParser" will be split in 3 words only:
"My", "Xml", "Parser".Constructor and Description |
---|
UpperCamelCase(boolean upperCaseAbbreviations) |
UpperCamelCase(boolean upperCaseAbbreviations,
String... ignorablePrefixes) |
UpperCamelCase(String... ignorablePrefixes) |
Modifier and Type | Method and Description |
---|---|
String |
join(List<Word> input)
Receive an ordered list of Word objects and returns a result property name.
|
split
public UpperCamelCase(boolean upperCaseAbbreviations, String... ignorablePrefixes)
upperCaseAbbreviations
- true
to uppercase all abbreviations, false
to
treat abbreviations as any other wordignorablePrefixes
- string prefixes to trim if constant field name prefixes are usedpublic UpperCamelCase(String... ignorablePrefixes)
ignorablePrefixes
- string prefixes to trim if constant field name prefixes are usedpublic UpperCamelCase(boolean upperCaseAbbreviations)
upperCaseAbbreviations
- true
to uppercase all abbreviations, false
to
treat abbreviations as any other wordpublic String join(List<Word> input)
NamingConvention
input
- list to translateCopyright © 2012–2020. All rights reserved.