Mapper.ImplicitCollectionMapping, Mapper.Null
Constructor and Description |
---|
DefaultMapper(java.lang.ClassLoader classLoader)
Deprecated.
As of 1.4.5 use
DefaultMapper(ClassLoaderReference) |
DefaultMapper(ClassLoaderReference classLoaderReference)
Construct a DefaultMapper.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String |
aliasForAttribute(java.lang.Class definedIn,
java.lang.String fieldName)
Deprecated.
As of 1.3, use combination of
serializedMember(Class, String) and getConverterFromItemType(String, Class, Class) |
java.lang.String |
aliasForAttribute(java.lang.String attribute)
Get the alias for an attribute's name.
|
java.lang.String |
aliasForSystemAttribute(java.lang.String attribute)
Get the alias for a system attribute's name.
|
java.lang.String |
attributeForAlias(java.lang.Class definedIn,
java.lang.String alias)
Deprecated.
As of 1.3, use combination of
realMember(Class, String) and getConverterFromItemType(String, Class, Class) |
java.lang.String |
attributeForAlias(java.lang.String alias)
Get the attribute's name for an alias.
|
java.lang.Class |
defaultImplementationOf(java.lang.Class type) |
SingleValueConverter |
getConverterFromAttribute(java.lang.Class definedIn,
java.lang.String attribute)
Deprecated.
As of 1.3.1, use
getConverterFromAttribute(Class, String, Class) |
SingleValueConverter |
getConverterFromAttribute(java.lang.Class definedIn,
java.lang.String attribute,
java.lang.Class type)
Returns which converter to use for an specific attribute in a type.
|
SingleValueConverter |
getConverterFromAttribute(java.lang.String name)
Deprecated.
As of 1.3, use
getConverterFromAttribute(Class, String, Class) |
SingleValueConverter |
getConverterFromItemType(java.lang.Class type)
Deprecated.
As of 1.3, use
getConverterFromItemType(String, Class, Class) |
SingleValueConverter |
getConverterFromItemType(java.lang.String fieldName,
java.lang.Class type)
Deprecated.
As of 1.3, use
getConverterFromItemType(String, Class, Class) |
SingleValueConverter |
getConverterFromItemType(java.lang.String fieldName,
java.lang.Class type,
java.lang.Class definedIn)
Returns a single value converter to be used in a specific field.
|
java.lang.String |
getFieldNameForItemTypeAndName(java.lang.Class definedIn,
java.lang.Class itemType,
java.lang.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(java.lang.Class itemType,
java.lang.String fieldName) |
java.lang.Class |
getItemTypeForItemFieldName(java.lang.Class definedIn,
java.lang.String itemFieldName) |
Converter |
getLocalConverter(java.lang.Class definedIn,
java.lang.String fieldName) |
boolean |
isIgnoredElement(java.lang.String name)
Whether this name can be ignored.
|
boolean |
isImmutableValueType(java.lang.Class type)
Whether this type is a simple immutable value (int, boolean, String, URL, etc).
|
boolean |
isReferenceable(java.lang.Class type)
Whether this type is referenceable in a stream.
|
Mapper |
lookupMapperOfType(java.lang.Class type) |
java.lang.String |
lookupName(java.lang.Class type) |
java.lang.Class |
lookupType(java.lang.String elementName) |
java.lang.Class |
realClass(java.lang.String elementName)
How a serialized class representation should be mapped back to a real class.
|
java.lang.String |
realMember(java.lang.Class type,
java.lang.String serialized)
How a serialized member representation should be mapped back to a real member.
|
java.lang.String |
serializedClass(java.lang.Class type)
How a class name should be represented in its serialized form.
|
java.lang.String |
serializedMember(java.lang.Class type,
java.lang.String memberName)
How a class member should be represented in its serialized form.
|
boolean |
shouldSerializeMember(java.lang.Class definedIn,
java.lang.String fieldName)
Determine whether a specific member should be serialized.
|
public DefaultMapper(ClassLoaderReference classLoaderReference)
classLoaderReference
- the reference to the classloader used by the XStream instance.public DefaultMapper(java.lang.ClassLoader classLoader)
DefaultMapper(ClassLoaderReference)
classLoader
- the ClassLoader used by the XStream instance.public java.lang.String serializedClass(java.lang.Class type)
Mapper
serializedClass
in interface Mapper
public java.lang.Class realClass(java.lang.String elementName)
Mapper
public java.lang.Class defaultImplementationOf(java.lang.Class type)
defaultImplementationOf
in interface Mapper
public java.lang.String aliasForAttribute(java.lang.String attribute)
Mapper
aliasForAttribute
in interface Mapper
attribute
- the attributepublic java.lang.String attributeForAlias(java.lang.String alias)
Mapper
attributeForAlias
in interface Mapper
alias
- the aliaspublic java.lang.String aliasForSystemAttribute(java.lang.String attribute)
Mapper
aliasForSystemAttribute
in interface Mapper
attribute
- the system attributepublic boolean isImmutableValueType(java.lang.Class type)
Mapper
isImmutableValueType
in interface Mapper
public boolean isReferenceable(java.lang.Class type)
Mapper
isReferenceable
in interface Mapper
public java.lang.String getFieldNameForItemTypeAndName(java.lang.Class definedIn, java.lang.Class itemType, java.lang.String itemFieldName)
Mapper
getFieldNameForItemTypeAndName
in interface Mapper
definedIn
- owning typeitemType
- item typeitemFieldName
- optional item element namepublic java.lang.Class getItemTypeForItemFieldName(java.lang.Class definedIn, java.lang.String itemFieldName)
getItemTypeForItemFieldName
in interface Mapper
public Mapper.ImplicitCollectionMapping getImplicitCollectionDefForFieldName(java.lang.Class itemType, java.lang.String fieldName)
getImplicitCollectionDefForFieldName
in interface Mapper
public boolean shouldSerializeMember(java.lang.Class definedIn, java.lang.String fieldName)
Mapper
shouldSerializeMember
in interface Mapper
public boolean isIgnoredElement(java.lang.String name)
Mapper
isIgnoredElement
in interface Mapper
public java.lang.String lookupName(java.lang.Class type)
public java.lang.Class lookupType(java.lang.String elementName)
public java.lang.String serializedMember(java.lang.Class type, java.lang.String memberName)
Mapper
serializedMember
in interface Mapper
public java.lang.String realMember(java.lang.Class type, java.lang.String serialized)
Mapper
realMember
in interface Mapper
public SingleValueConverter getConverterFromAttribute(java.lang.String name)
getConverterFromAttribute(Class, String, Class)
getConverterFromAttribute
in interface Mapper
public SingleValueConverter getConverterFromItemType(java.lang.String fieldName, java.lang.Class type)
getConverterFromItemType(String, Class, Class)
getConverterFromItemType
in interface Mapper
public SingleValueConverter getConverterFromItemType(java.lang.Class type)
getConverterFromItemType(String, Class, Class)
getConverterFromItemType
in interface Mapper
public SingleValueConverter getConverterFromItemType(java.lang.String fieldName, java.lang.Class type, java.lang.Class definedIn)
Mapper
getConverterFromItemType
in interface Mapper
fieldName
- the field nametype
- the field typedefinedIn
- the type which defines this fieldpublic Converter getLocalConverter(java.lang.Class definedIn, java.lang.String fieldName)
getLocalConverter
in interface Mapper
public Mapper lookupMapperOfType(java.lang.Class type)
lookupMapperOfType
in interface Mapper
public java.lang.String aliasForAttribute(java.lang.Class definedIn, java.lang.String fieldName)
serializedMember(Class, String)
and getConverterFromItemType(String, Class, Class)
Mapper
aliasForAttribute
in interface Mapper
definedIn
- the type where the field was definedfieldName
- the field namepublic java.lang.String attributeForAlias(java.lang.Class definedIn, java.lang.String alias)
realMember(Class, String)
and getConverterFromItemType(String, Class, Class)
Mapper
attributeForAlias
in interface Mapper
definedIn
- the type where the field was definedalias
- the aliaspublic SingleValueConverter getConverterFromAttribute(java.lang.Class definedIn, java.lang.String attribute)
getConverterFromAttribute(Class, String, Class)
Mapper
getConverterFromAttribute
in interface Mapper
definedIn
- the field's parentattribute
- the attribute namepublic SingleValueConverter getConverterFromAttribute(java.lang.Class definedIn, java.lang.String attribute, java.lang.Class type)
Mapper
getConverterFromAttribute
in interface Mapper
definedIn
- the field's parentattribute
- the attribute nametype
- the type the converter should createCopyright © 2004–2022 XStream. All rights reserved.