public interface Mapper
Modifier and Type | Interface and Description |
---|---|
static interface |
Mapper.ImplicitCollectionMapping |
static class |
Mapper.Null
Place holder type used for null values.
|
Modifier and Type | Method and Description |
---|---|
String |
aliasForAttribute(Class definedIn,
String fieldName)
Deprecated.
As of 1.3, use combination of
serializedMember(Class, String) and getConverterFromItemType(String, Class, Class) |
String |
aliasForAttribute(String attribute)
Get the alias for an attribute's name.
|
String |
aliasForSystemAttribute(String attribute)
Get the alias for a system attribute's name.
|
String |
attributeForAlias(Class definedIn,
String alias)
Deprecated.
As of 1.3, use combination of
realMember(Class, String) and getConverterFromItemType(String, Class, Class) |
String |
attributeForAlias(String alias)
Get the attribute's name for an alias.
|
Class |
defaultImplementationOf(Class type) |
SingleValueConverter |
getConverterFromAttribute(Class definedIn,
String attribute)
Deprecated.
As of 1.3.1, use
getConverterFromAttribute(Class, String, Class) |
SingleValueConverter |
getConverterFromAttribute(Class definedIn,
String attribute,
Class type)
Returns which converter to use for an specific attribute in a type.
|
SingleValueConverter |
getConverterFromAttribute(String name)
Deprecated.
As of 1.3, use
getConverterFromAttribute(Class, String, Class) |
SingleValueConverter |
getConverterFromItemType(Class type)
Deprecated.
As of 1.3, use
getConverterFromItemType(String, Class, Class) |
SingleValueConverter |
getConverterFromItemType(String fieldName,
Class type)
Deprecated.
As of 1.3, use
getConverterFromItemType(String, Class, Class) |
SingleValueConverter |
getConverterFromItemType(String fieldName,
Class type,
Class definedIn)
Returns a single value converter to be used in a specific field.
|
String |
getFieldNameForItemTypeAndName(Class definedIn,
Class itemType,
String itemFieldName)
Get the name of the field that acts as the default collection for an object, or return null if there is none.
|
Mapper.ImplicitCollectionMapping |
getImplicitCollectionDefForFieldName(Class itemType,
String fieldName) |
Class |
getItemTypeForItemFieldName(Class definedIn,
String itemFieldName) |
Converter |
getLocalConverter(Class definedIn,
String fieldName) |
boolean |
isIgnoredElement(String name)
Whether this name can be ignored.
|
boolean |
isImmutableValueType(Class type)
Whether this type is a simple immutable value (int, boolean, String, URL, etc).
|
boolean |
isReferenceable(Class type)
Whether this type is referenceable in a stream.
|
Mapper |
lookupMapperOfType(Class type) |
Class |
realClass(String elementName)
How a serialized class representation should be mapped back to a real class.
|
String |
realMember(Class type,
String serialized)
How a serialized member representation should be mapped back to a real member.
|
String |
serializedClass(Class type)
How a class name should be represented in its serialized form.
|
String |
serializedMember(Class type,
String memberName)
How a class member should be represented in its serialized form.
|
boolean |
shouldSerializeMember(Class definedIn,
String fieldName)
Determine whether a specific member should be serialized.
|
String serializedClass(Class type)
Class realClass(String elementName)
String serializedMember(Class type, String memberName)
String realMember(Class type, String serialized)
boolean isImmutableValueType(Class type)
boolean isReferenceable(Class type)
String aliasForAttribute(String attribute)
attribute
- the attributeString attributeForAlias(String alias)
alias
- the aliasString aliasForSystemAttribute(String attribute)
attribute
- the system attributeString getFieldNameForItemTypeAndName(Class definedIn, Class itemType, String itemFieldName)
definedIn
- owning typeitemType
- item typeitemFieldName
- optional item element nameClass getItemTypeForItemFieldName(Class definedIn, String itemFieldName)
Mapper.ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName)
boolean shouldSerializeMember(Class definedIn, String fieldName)
boolean isIgnoredElement(String name)
SingleValueConverter getConverterFromItemType(String fieldName, Class type)
getConverterFromItemType(String, Class, Class)
SingleValueConverter getConverterFromItemType(Class type)
getConverterFromItemType(String, Class, Class)
SingleValueConverter getConverterFromAttribute(String name)
getConverterFromAttribute(Class, String, Class)
SingleValueConverter getConverterFromItemType(String fieldName, Class type, Class definedIn)
fieldName
- the field nametype
- the field typedefinedIn
- the type which defines this fieldString aliasForAttribute(Class definedIn, String fieldName)
serializedMember(Class, String)
and getConverterFromItemType(String, Class, Class)
definedIn
- the type where the field was definedfieldName
- the field nameString attributeForAlias(Class definedIn, String alias)
realMember(Class, String)
and getConverterFromItemType(String, Class, Class)
definedIn
- the type where the field was definedalias
- the aliasSingleValueConverter getConverterFromAttribute(Class definedIn, String attribute)
getConverterFromAttribute(Class, String, Class)
definedIn
- the field's parentattribute
- the attribute nameSingleValueConverter getConverterFromAttribute(Class definedIn, String attribute, Class type)
definedIn
- the field's parentattribute
- the attribute nametype
- the type the converter should createCopyright © 2004–2017 XStream. All rights reserved.