|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.torque.generator.processor.string.CharReplacer
org.apache.torque.generator.processor.string.ConstantNameCreator
public class ConstantNameCreator
Creates the name of a constant from a string. All letters in the String are capitalized, and underscores (_) are used as separators per default.
| Field Summary | |
|---|---|
static String |
UPPER_CASE_SEPPARATION_PREFIX
The String which is usually used as prefix in front of upper case characters in java constants. |
| Fields inherited from class org.apache.torque.generator.processor.string.CharReplacer |
|---|
JAVA_CLASSNAME_REPLACEMENT, JAVA_CLASSNAME_SPECIAL_CHARS |
| Constructor Summary | |
|---|---|
ConstantNameCreator()
Constructor. |
|
| Method Summary | |
|---|---|
String |
getUpperCaseSeparationPrefix()
Returns the prefix which is used as Separator when an upper case character is encountered after a lower case character. |
String |
process(String toProcess)
Replaces all characters in toProcess which occur in
toReplace with toReplaceWith; groups of
special characters are treated as one. |
void |
setUpperCaseSeparationPrefix(String upperCaseSeparationPrefix)
Sets the prefix which is used as Separator when an upper case character is encountered after a lower case character. |
| Methods inherited from class org.apache.torque.generator.processor.string.CharReplacer |
|---|
getToReplace, getToReplaceWith, setToReplace, setToReplaceWith |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String UPPER_CASE_SEPPARATION_PREFIX
| Constructor Detail |
|---|
public ConstantNameCreator()
| Method Detail |
|---|
public String getUpperCaseSeparationPrefix()
public void setUpperCaseSeparationPrefix(String upperCaseSeparationPrefix)
upperCaseSeparationPrefix - the separator which is inserted
between a lower case character and an upper case character.public String process(String toProcess)
toProcess which occur in
toReplace with toReplaceWith; groups of
special characters are treated as one.
Inserts UPPER_CASE_SEPPARATION_PREFIX if an upper case
character follows a lower case character, and converts all charcters
to upper case. Finally, the new String is returned.
process in interface StringProcessorprocess in class CharReplacertoProcess - the String in which replacement should occur, not null.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||