Class CharReplacer
java.lang.Object
org.apache.torque.generator.processor.string.CharReplacer
- All Implemented Interfaces:
StringProcessor
- Direct Known Subclasses:
ConstantNameCreator
Replaces characters by a String.
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns a String containing all the characters which should be replaced.Returns the String which are inserted instead of the replaced characters.Replaces all characters intoProcesswhich occur intoReplacewithtoReplaceWithand returns the new StringvoidsetToReplace(String toReplace) Sets the characters which should be replaced.voidsetToReplaceWith(String toReplaceWith) Sets the String which are inserted instead of the replaced characters.toString()
-
Field Details
-
JAVA_CLASSNAME_SPECIAL_CHARS
Characters which are not allowed in java class names- See Also:
-
JAVA_CLASSNAME_REPLACEMENT
The String which is usually used as replacement for not allowed characters in java class names.- See Also:
-
-
Constructor Details
-
CharReplacer
public CharReplacer()
-
-
Method Details
-
getToReplace
Returns a String containing all the characters which should be replaced.- Returns:
- the Characters which should be replaced, not null.
-
setToReplace
Sets the characters which should be replaced.- Parameters:
toReplace- a String containing all the Characters which should be replaced, not null.
-
getToReplaceWith
Returns the String which are inserted instead of the replaced characters.- Returns:
- the replacement, not null.
-
setToReplaceWith
Sets the String which are inserted instead of the replaced characters.- Parameters:
toReplaceWith- the replacement, not null.
-
process
Replaces all characters intoProcesswhich occur intoReplacewithtoReplaceWithand returns the new String- Specified by:
processin interfaceStringProcessor- Parameters:
toProcess- the String in which replacement should occur, not null.- Returns:
- the processed String, not null.
-
toString
-