@FunctionalInterface
public interface ParameterNamingStrategy
This also contains built-in naming strategies for common naming conventions, such as upper camel case and lower-spaced case.
Note that a parameter that has @Named on it will not be passed
to the naming strategy, and will get its name from the annotation specified
on it.
| Modifier and Type | Method and Description |
|---|---|
@NotNull java.lang.String |
getName(@NotNull java.lang.reflect.Parameter parameter)
Returns the parameter name.
|
static ParameterNamingStrategy |
identity()
Preserves the default parameter name.
|
static ParameterNamingStrategy |
lowerCaseWithSeparator(java.lang.String separator)
Converts the parameter name from lower-camel case to lower case,
separated by a custom separator.
|
static ParameterNamingStrategy |
lowerCaseWithSpace()
Converts the parameter name from lower-camel case to lower case,
separated by a space.
|
static ParameterNamingStrategy |
upperCamelCase()
Converts the parameter name from lower-camel case to upper-camel case.
|
static ParameterNamingStrategy |
upperCamelCaseWithSeparator(java.lang.String separator)
Converts the parameter name from lower-camel case to upper-camel case,
separated by a custom separator.
|
static ParameterNamingStrategy |
upperCamelCaseWithSpace()
Converts the parameter name from lower-camel case to upper-camel case,
separated by spaces.
|
static ParameterNamingStrategy identity()
static ParameterNamingStrategy lowerCaseWithSeparator(java.lang.String separator)
This will capitalize the first character and separate words by the specified string.
static ParameterNamingStrategy lowerCaseWithSpace()
This will capitalize the first character and separate words by a space.
static ParameterNamingStrategy upperCamelCase()
static ParameterNamingStrategy upperCamelCaseWithSpace()
This will capitalize the first character and separate words by spaces.
static ParameterNamingStrategy upperCamelCaseWithSeparator(java.lang.String separator)
This will capitalize the first character and separate words by the specified string.
@NotNull
@NotNull java.lang.String getName(@NotNull
@NotNull java.lang.reflect.Parameter parameter)
parameter - Parameter to get the name for