org.apache.commons.betwixt.strategy
Class DefaultNameMapper

java.lang.Object
  extended byorg.apache.commons.betwixt.strategy.DefaultNameMapper
All Implemented Interfaces:
NameMapper

public class DefaultNameMapper
extends java.lang.Object
implements NameMapper

A default implementation of the name mapper. This mapper simply returns the unmodified type name.

For example, PropertyName would be converted to PropertyName.

Version:
$Revision: 155402 $
Author:
James Strachan

Nested Class Summary
private static class DefaultNameMapper.PlainMapper
          Base implementation chained by bad character replacement mapper
 
Field Summary
private static BadCharacterReplacingNMapper badCharacterReplacementNMapper
          Used to convert bad character in the name
 
Constructor Summary
DefaultNameMapper()
           
 
Method Summary
 java.lang.String mapTypeToElementName(java.lang.String typeName)
          This implementation returns the parameter passed after deleting any characters which the XML specification does not allow in element names.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

badCharacterReplacementNMapper

private static final BadCharacterReplacingNMapper badCharacterReplacementNMapper
Used to convert bad character in the name

Constructor Detail

DefaultNameMapper

public DefaultNameMapper()
Method Detail

mapTypeToElementName

public java.lang.String mapTypeToElementName(java.lang.String typeName)
This implementation returns the parameter passed after deleting any characters which the XML specification does not allow in element names.

Specified by:
mapTypeToElementName in interface NameMapper
Parameters:
typeName - the string to convert
Returns:
the typeName parameter without modification