- All Known Implementing Classes:
Naming.Adapter
public interface Naming
A naming convention controller.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Namingthe default conventionstatic final Namingthe adapter forNamingType.LOWER_CASEstatic final Namingthe adapter forNamingType.NONEstatic final Namingthe adapter forNamingType.SNAKE_LOWER_CASEstatic final Namingthe adapter forNamingType.SNAKE_UPPER_CASEstatic final Namingthe adapter forNamingType.UPPER_CASE -
Method Summary
Modifier and TypeMethodDescriptionapply(NamingType namingType, String text) Applies the naming convention.revert(NamingType namingType, String text) Reverts the text to the original as much as possible.
-
Field Details
-
NONE
the adapter forNamingType.NONE -
LOWER_CASE
the adapter forNamingType.LOWER_CASE -
UPPER_CASE
the adapter forNamingType.UPPER_CASE -
SNAKE_LOWER_CASE
the adapter forNamingType.SNAKE_LOWER_CASE -
SNAKE_UPPER_CASE
the adapter forNamingType.SNAKE_UPPER_CASE -
DEFAULT
the default convention
-
-
Method Details
-
apply
Applies the naming convention.- Parameters:
namingType- the naming convention. If this parameter isnull,Entity.naming()does not have explicit value.text- the text- Returns:
- the converted text
- Throws:
DomaNullPointerException- iftextisnull
-
revert
Reverts the text to the original as much as possible.- Parameters:
namingType- the naming convention. If this parameter isnull,Entity.naming()does not have explicit value.text- the text that is converted by this convention- Returns:
- the original
- Throws:
DomaNullPointerException- iftextisnull
-