public class NameUtils extends Object
| Constructor and Description |
|---|
NameUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
buildAccessor(String prefix,
String fieldName)
Given a
fieldName, it will transform it accordingly to "JavaBeans(TM) Specification 1.01 Final Release",
section "8.8 Capitalization of inferred names." to be later added as a suffix of prefix. |
static String |
buildGetter(String fieldName) |
static String |
buildSetter(String fieldName) |
static String |
camel(String uncamelCaseName) |
static String |
friendlyNameFromCamelCase(String camelCaseName) |
static boolean |
isUncountable(String word)
Return true if the word is uncountable.
|
static String |
pluralize(String word)
Return the pluralized version of a word.
|
static String |
singularize(String word)
Return the singularized version of a word.
|
static String |
uncamel(String camelCaseName) |
public static String pluralize(String word)
word - The wordpublic static String singularize(String word)
word - The wordpublic static boolean isUncountable(String word)
word - The wordpublic static String buildAccessor(String prefix, String fieldName)
Given a fieldName, it will transform it accordingly to "JavaBeans(TM) Specification 1.01 Final Release",
section "8.8 Capitalization of inferred names." to be later added as a suffix of prefix.
Samples:
prefix - to be added to the modified fieldNamefieldName - to be modified as "8.8 Capitalization of inferred names."fieldName to the prefixCopyright © 2010–2015 MuleSoft, Inc.. All rights reserved.