public class NameUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
COMPONENT_NAME_SEPARATOR
the configuration file component name separator.
|
| Modifier | Constructor and Description |
|---|---|
protected |
NameUtils() |
| Modifier and Type | Method and Description |
|---|---|
static String |
hyphenize(String camelCaseName)
Transforms a camel case value into a hyphenized one.
|
static String |
sanitizeName(Optional<String> originalName)
Removes everything that's not a word, a dot nor a hyphen
|
static String |
sanitizeName(String originalName)
Removes everything that's not a word, a dot nor a hyphen
|
static String |
titleize(String name)
Transforms a name into a title
|
static String |
toCamelCase(String value,
String separator)
Converts an string with multiple parts separated by
separator to another string where each part is concatenated using
camel case for each part expect for the first part which will be all lowercase. |
static String |
underscorize(String camelCaseName)
Transforms a camel case value into an underscorized one.
|
public static final String COMPONENT_NAME_SEPARATOR
public static String hyphenize(String camelCaseName)
For example: messageProcessor would be transformed to message-processor
camelCaseName - a String in camel case formcamelCaseName in hypenized formpublic static String underscorize(String camelCaseName)
For example: messageProcessor would be transformed to message_processor
camelCaseName - a String in camel case formcamelCaseName in underscorized formpublic static String toCamelCase(String value, String separator)
separator to another string where each part is concatenated using
camel case for each part expect for the first part which will be all lowercase.value - the input stringseparator - the string that represents the separatorpublic static String sanitizeName(String originalName)
originalName - name that needs the removal of invalid characterspublic static String sanitizeName(Optional<String> originalName)
originalName - name that needs the removal of invalid charactersCopyright © 2019 MuleSoft, Inc.. All rights reserved.