public class BadCharacterReplacingNMapper extends Object implements NameMapper
NameMapper
implementation that processes a name by replacing or stripping
illegal characters before passing result down the chain.Constructor and Description |
---|
BadCharacterReplacingNMapper(NameMapper chainedMapper)
Constructs a replacing mapper which delegates to given mapper.
|
Modifier and Type | Method and Description |
---|---|
Character |
getReplacement()
Gets the character that should be used to replace bad characters
if null then bad characters will be deleted.
|
String |
mapTypeToElementName(String typeName)
This implementation processes characters which are not allowed in xml
element names and then returns the result from the next link in the chain.
|
void |
setReplacement(Character replacement)
Sets the character that should be used to replace bad characters.
|
public BadCharacterReplacingNMapper(NameMapper chainedMapper)
chainedMapper
- next link in processing chain, possibly nullpublic Character getReplacement()
public void setReplacement(Character replacement)
replacement
- the Charcter to be used for replacement if not null.
Otherwise, indicates that illegal characters should be deleted.public String mapTypeToElementName(String typeName)
mapTypeToElementName
in interface NameMapper
typeName
- the string to convertCopyright © 2002-2013 Apache Software Foundation. All Rights Reserved.