public class CharReplacer extends Object implements StringProcessor
| Modifier and Type | Field and Description | 
|---|---|
| static String | JAVA_CLASSNAME_REPLACEMENTThe String which is usually used as replacement for not allowed
 characters in java class names. | 
| static String | JAVA_CLASSNAME_SPECIAL_CHARSCharacters which are not allowed in java class names | 
| Constructor and Description | 
|---|
| CharReplacer() | 
| Modifier and Type | Method and Description | 
|---|---|
| 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  toProcesswhich occur intoReplacewithtoReplaceWithand 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. | 
| String | toString() | 
public static final String JAVA_CLASSNAME_SPECIAL_CHARS
public static final String JAVA_CLASSNAME_REPLACEMENT
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 Stringprocess in interface StringProcessortoProcess - the String in which replacement should occur, not null.Copyright © 2000–2020 The Apache Software Foundation. All rights reserved.