flattree.xstream
Class CamelCaseMapper

java.lang.Object
  extended by com.thoughtworks.xstream.mapper.MapperWrapper
      extended by flattree.xstream.CamelCaseMapper
All Implemented Interfaces:
com.thoughtworks.xstream.mapper.Mapper

public class CamelCaseMapper
extends com.thoughtworks.xstream.mapper.MapperWrapper

A Mapper replacing upper case characters in Class and property names with hyphens.


Nested Class Summary
 
Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper
com.thoughtworks.xstream.mapper.Mapper.ImplicitCollectionMapping, com.thoughtworks.xstream.mapper.Mapper.Null
 
Constructor Summary
CamelCaseMapper(com.thoughtworks.xstream.mapper.Mapper mapper, Package filter)
           
 
Method Summary
protected static String dehyphenize(String string)
           
protected static String hyphenize(String string)
           
 Class realClass(String string)
           
 String realMember(Class clazz, String member)
           
 String serializedClass(Class clazz)
           
 String serializedMember(Class clazz, String realMember)
           
protected static String startLowerCase(String string)
           
protected static String startUpperCase(String string)
           
 
Methods inherited from class com.thoughtworks.xstream.mapper.MapperWrapper
aliasForAttribute, aliasForAttribute, aliasForSystemAttribute, attributeForAlias, attributeForAlias, attributeForClassDefiningField, attributeForEnumType, attributeForImplementationClass, attributeForReadResolveField, defaultImplementationOf, getConverterFromAttribute, getConverterFromAttribute, getConverterFromAttribute, getConverterFromItemType, getConverterFromItemType, getConverterFromItemType, getFieldNameForItemTypeAndName, getImplicitCollectionDefForFieldName, getItemTypeForItemFieldName, getLocalConverter, isImmutableValueType, lookupMapperOfType, shouldSerializeMember
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CamelCaseMapper

public CamelCaseMapper(com.thoughtworks.xstream.mapper.Mapper mapper,
                       Package filter)
Method Detail

serializedClass

public String serializedClass(Class clazz)
Specified by:
serializedClass in interface com.thoughtworks.xstream.mapper.Mapper
Overrides:
serializedClass in class com.thoughtworks.xstream.mapper.MapperWrapper

realClass

public Class realClass(String string)
Specified by:
realClass in interface com.thoughtworks.xstream.mapper.Mapper
Overrides:
realClass in class com.thoughtworks.xstream.mapper.MapperWrapper

realMember

public String realMember(Class clazz,
                         String member)
Specified by:
realMember in interface com.thoughtworks.xstream.mapper.Mapper
Overrides:
realMember in class com.thoughtworks.xstream.mapper.MapperWrapper

serializedMember

public String serializedMember(Class clazz,
                               String realMember)
Specified by:
serializedMember in interface com.thoughtworks.xstream.mapper.Mapper
Overrides:
serializedMember in class com.thoughtworks.xstream.mapper.MapperWrapper

startLowerCase

protected static String startLowerCase(String string)

startUpperCase

protected static String startUpperCase(String string)

hyphenize

protected static String hyphenize(String string)

dehyphenize

protected static String dehyphenize(String string)


Copyright © 2011. All Rights Reserved.