|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.torque.generator.processor.string.CharReplacer
public class CharReplacer
Replaces characters by a String.
Field Summary | |
---|---|
static String |
JAVA_CLASSNAME_REPLACEMENT
The String which is usually used as replacement for not allowed characters in java class names. |
static String |
JAVA_CLASSNAME_SPECIAL_CHARS
Characters which are not allowed in java class names |
Constructor Summary | |
---|---|
CharReplacer()
|
Method Summary | |
---|---|
String |
getToReplace()
Returns a String containing all the characters which should be replaced. |
String |
getToReplaceWith()
Returns the String which are inserted instead of the replaced characters. |
String |
process(String toProcess)
Replaces all characters in toProcess which occur in
toReplace with toReplaceWith and returns the
new String |
void |
setToReplace(String toReplace)
Sets the characters which should be replaced. |
void |
setToReplaceWith(String toReplaceWith)
Sets the String which are inserted instead of the replaced characters. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String JAVA_CLASSNAME_SPECIAL_CHARS
public static final String JAVA_CLASSNAME_REPLACEMENT
Constructor Detail |
---|
public CharReplacer()
Method Detail |
---|
public String getToReplace()
public void setToReplace(String toReplace)
toReplace
- a String containing all the Characters
which should be replaced, not null.public String getToReplaceWith()
public void setToReplaceWith(String toReplaceWith)
toReplaceWith
- the replacement, not null.public String process(String toProcess)
toProcess
which occur in
toReplace
with toReplaceWith
and returns the
new String
process
in interface StringProcessor
toProcess
- 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 |