Mapper.ImplicitCollectionMapping, Mapper.Null| Constructor and Description |
|---|
DefaultMapper(ClassLoader classLoader) |
DefaultMapper(ClassLoader classLoader,
String classAttributeIdentifier)
Deprecated.
since 1.2, use XStream.aliasAttrbute() for a different attribute name.
|
| Modifier and Type | Method and Description |
|---|---|
String |
aliasForAttribute(Class definedIn,
String fieldName)
Deprecated.
since 1.3, use combination of
serializedMember(Class, String) and getConverterFromItemType(String, Class, Class) |
String |
aliasForAttribute(String attribute)
Get the alias for an attrbute's name.
|
String |
attributeForAlias(Class definedIn,
String alias)
Deprecated.
since 1.3, use combination of
realMember(Class, String) and getConverterFromItemType(String, Class, Class) |
String |
attributeForAlias(String alias)
Get the attribut's name for an alias.
|
String |
attributeForClassDefiningField()
Deprecated.
since 1.2, use aliasForAttribute instead.
|
String |
attributeForEnumType()
Deprecated.
since 1.2, use aliasForAttribute instead.
|
String |
attributeForImplementationClass()
Deprecated.
since 1.2, use aliasForAttribute instead.
|
String |
attributeForReadResolveField()
Deprecated.
since 1.2, use aliasForAttribute instead.
|
Class |
defaultImplementationOf(Class type) |
SingleValueConverter |
getConverterFromAttribute(Class type,
String attribute)
Returns which converter to use for an specific attribute in a type.
|
SingleValueConverter |
getConverterFromAttribute(String name)
Deprecated.
since 1.3, use
getConverterFromAttribute(Class, String) |
SingleValueConverter |
getConverterFromItemType(Class type)
Deprecated.
since 1.3, use
getConverterFromItemType(String, Class, Class) |
SingleValueConverter |
getConverterFromItemType(String fieldName,
Class type)
Deprecated.
since 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 |
isImmutableValueType(Class type)
Whether this type is a simple immutable value (int, boolean, String, URL, etc.
|
Mapper |
lookupMapperOfType(Class type) |
String |
lookupName(Class type) |
Class |
lookupType(String elementName) |
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.
|
public DefaultMapper(ClassLoader classLoader)
public DefaultMapper(ClassLoader classLoader, String classAttributeIdentifier)
public String serializedClass(Class type)
MapperserializedClass in interface Mapperpublic Class realClass(String elementName)
Mapperpublic Class defaultImplementationOf(Class type)
defaultImplementationOf in interface Mapperpublic String attributeForClassDefiningField()
attributeForClassDefiningField in interface Mapperpublic String attributeForReadResolveField()
attributeForReadResolveField in interface Mapperpublic String attributeForEnumType()
attributeForEnumType in interface Mapperpublic String attributeForImplementationClass()
attributeForImplementationClass in interface Mapperpublic String aliasForAttribute(String attribute)
MapperaliasForAttribute in interface Mapperattribute - the attributepublic String attributeForAlias(String alias)
MapperattributeForAlias in interface Mapperalias - the aliaspublic boolean isImmutableValueType(Class type)
MapperisImmutableValueType in interface Mapperpublic String getFieldNameForItemTypeAndName(Class definedIn, Class itemType, String itemFieldName)
MappergetFieldNameForItemTypeAndName in interface MapperdefinedIn - owning typeitemType - item typeitemFieldName - optional item element namepublic Class getItemTypeForItemFieldName(Class definedIn, String itemFieldName)
getItemTypeForItemFieldName in interface Mapperpublic Mapper.ImplicitCollectionMapping getImplicitCollectionDefForFieldName(Class itemType, String fieldName)
getImplicitCollectionDefForFieldName in interface Mapperpublic boolean shouldSerializeMember(Class definedIn, String fieldName)
MappershouldSerializeMember in interface Mapperpublic String serializedMember(Class type, String memberName)
MapperserializedMember in interface Mapperpublic String realMember(Class type, String serialized)
MapperrealMember in interface Mapperpublic SingleValueConverter getConverterFromAttribute(String name)
getConverterFromAttribute(Class, String)getConverterFromAttribute in interface Mapperpublic SingleValueConverter getConverterFromItemType(String fieldName, Class type)
getConverterFromItemType(String, Class, Class)getConverterFromItemType in interface Mapperpublic SingleValueConverter getConverterFromItemType(Class type)
getConverterFromItemType(String, Class, Class)getConverterFromItemType in interface Mapperpublic SingleValueConverter getConverterFromItemType(String fieldName, Class type, Class definedIn)
MappergetConverterFromItemType in interface MapperfieldName - the field nametype - the field typedefinedIn - the type which defines this fieldpublic Converter getLocalConverter(Class definedIn, String fieldName)
getLocalConverter in interface Mapperpublic Mapper lookupMapperOfType(Class type)
lookupMapperOfType in interface Mapperpublic String aliasForAttribute(Class definedIn, String fieldName)
serializedMember(Class, String) and getConverterFromItemType(String, Class, Class)MapperaliasForAttribute in interface MapperdefinedIn - the type where the field was definedfieldName - the field namepublic String attributeForAlias(Class definedIn, String alias)
realMember(Class, String) and getConverterFromItemType(String, Class, Class)MapperattributeForAlias in interface MapperdefinedIn - the type where the field was definedalias - the aliaspublic SingleValueConverter getConverterFromAttribute(Class type, String attribute)
MappergetConverterFromAttribute in interface Mappertype - the field's parentattribute - the attribute nameCopyright © 2020 Internet2. All rights reserved.