Class Camelbacker
java.lang.Object
org.apache.torque.generator.processor.string.Camelbacker
- All Implemented Interfaces:
StringProcessor
Creates a String in CaMelBaCk case from a String with special characters
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the separation chars which define the tail to be removed.Returns the separation characters which defile the prefix to be removed.Returns which characters are removed from the processed String.Returns the characters which are removed from the processed String and cause the following character to be converted to upper case.booleanReturns whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable).booleanReturns whether the first character is always converted to upper case.Does the camelback processing according to the settings.voidsetDefaultLowerCase(boolean defaultLowerCase) Sets whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable).voidsetFirstCharUppercase(boolean firstCharUppercase) Sets whether the first character should always be upper case.voidsetIgnorePartAfter(String ignorePartAfter) Sets the separation chars which define the suffix to be removed.voidsetIgnorePartBefore(String ignorePartBefore) Sets the separation characters which define the prefix to be removed.voidsetRemoveWithoutUppercase(String removeWithoutUppercase) Sets which characters are removed from the processed String.voidsetRemoveWithUppercase(String removeWithUppercase) Sets the characters which are removed from the processed String and cause the following character to be converted to upper case.
-
Constructor Details
-
Camelbacker
public Camelbacker()
-
-
Method Details
-
process
Does the camelback processing according to the settings.- Specified by:
processin interfaceStringProcessor- Parameters:
toProcess- the String to process.- Returns:
- the processed String.
-
isFirstCharUppercase
public boolean isFirstCharUppercase()Returns whether the first character is always converted to upper case.- Returns:
- true if the first character is always converted to upper case, false if not.
-
setFirstCharUppercase
public void setFirstCharUppercase(boolean firstCharUppercase) Sets whether the first character should always be upper case. Default is true.- Parameters:
firstCharUppercase- true if the first character should always be converted to upper case, false if not.
-
getIgnorePartAfter
Returns the separation chars which define the tail to be removed. If one of the characters in this String is encountered in the processed String, the part of the processed String after it are ignored. The character itself is retained, unless it is removed by another rule.- Returns:
- the separation chars for removing the tail.
-
setIgnorePartAfter
Sets the separation chars which define the suffix to be removed. If one of the characters in this String is encountered in the processed String, the part of the processed String after it are ignored. The character itself is retained, unless it is removed by another rule.- Parameters:
ignorePartAfter- the separation chars for removing the tail.
-
getIgnorePartBefore
Returns the separation characters which defile the prefix to be removed. If one of the characters in this String is encountered in the processed String, the part of the processed String before it are ignored. The character itself is retained, unless it is removed by another rule.- Returns:
- the separation chars which define the suffix to be removed.
-
setIgnorePartBefore
Sets the separation characters which define the prefix to be removed. If one of the characters in this String is encountered in the processed String, the part of the processed String before it are ignored. The character itself is retained, unless it is removed by another rule.- Parameters:
ignorePartBefore- the separation chars which define the suffix to be removed.
-
getRemoveWithoutUppercase
Returns which characters are removed from the processed String.- Returns:
- a String containing all characters which are simply removed from the input String.
-
setRemoveWithoutUppercase
Sets which characters are removed from the processed String. Default is "."- Parameters:
removeWithoutUppercase- a String containing all characters which are simply removed from the input String.
-
getRemoveWithUppercase
Returns the characters which are removed from the processed String and cause the following character to be converted to upper case.- Returns:
- a String containing all characters which are removed from the input String and which cause the following character to be converted to upper case.
-
setRemoveWithUppercase
Sets the characters which are removed from the processed String and cause the following character to be converted to upper case. Default is "_-"- Parameters:
removeWithUppercase- a String containing all characters which are removed from the input String and which cause the following character to be converted to upper case.
-
isDefaultLowerCase
public boolean isDefaultLowerCase()Returns whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable).- Returns:
- true if all characters are converted to lower case by default, false if not.
-
setDefaultLowerCase
public void setDefaultLowerCase(boolean defaultLowerCase) Sets whether all characters in the processed String should be made lower Case by default (i.e if none of the camelback rules is applicable). Default is true.- Parameters:
defaultLowerCase- true if all characters are converted to lower case by default, false if not.
-