|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.thoughtworks.xstream.mapper.MapperWrapper
com.thoughtworks.xstream.mapper.AttributeAliasingMapper
public class AttributeAliasingMapper
Mapper that allows aliasing of attribute names.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface com.thoughtworks.xstream.mapper.Mapper |
|---|
Mapper.ImplicitCollectionMapping, Mapper.Null |
| Constructor Summary | |
|---|---|
AttributeAliasingMapper(Mapper wrapped)
|
|
| Method Summary | |
|---|---|
void |
addAliasFor(Class definedIn,
String fieldName,
String alias)
Adds an alias for a specific field. |
void |
addAliasFor(String attributeName,
String alias)
|
String |
aliasForAttribute(Class definedIn,
String fieldName)
Returns an alias for a single field defined in an specific type. |
String |
aliasForAttribute(String attribute)
Get the alias for an attrbute's name. |
String |
attributeForAlias(Class definedIn,
String alias)
Returns the field name for an aliased attribute. |
String |
attributeForAlias(String alias)
Get the attribut's name for an alias. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public AttributeAliasingMapper(Mapper wrapped)
| Method Detail |
|---|
public void addAliasFor(String attributeName,
String alias)
public String aliasForAttribute(String attribute)
Mapper
aliasForAttribute in interface MapperaliasForAttribute in class MapperWrapperattribute - the attribute
public String attributeForAlias(String alias)
Mapper
attributeForAlias in interface MapperattributeForAlias in class MapperWrapperalias - the alias
public String aliasForAttribute(Class definedIn,
String fieldName)
Mapper
aliasForAttribute in interface MapperaliasForAttribute in class MapperWrapperdefinedIn - the type where the field was definedfieldName - the field name
public String attributeForAlias(Class definedIn,
String alias)
Mapper
attributeForAlias in interface MapperattributeForAlias in class MapperWrapperdefinedIn - the type where the field was definedalias - the alias
public void addAliasFor(Class definedIn,
String fieldName,
String alias)
definedIn - the type where the field was definedfieldName - the field namealias - the alias to be used
since 1.2.2
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||