java.lang.Object | ||
↳ | com.thoughtworks.xstream.mapper.MapperWrapper | |
↳ | com.thoughtworks.xstream.mapper.EnumMapper |
Mapper that handles the special case of polymorphic enums in Java 1.5. This renames MyEnum$1 to MyEnum making it less bloaty in the XML and avoiding the need for an alias per enum value to be specified. Additionally every enum is treated automatically as immutable type and can be written as attribute.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
This constructor is deprecated.
since 1.3.1, use
EnumMapper(Mapper)
| |||||||||||
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Returns which converter to use for an specific attribute in a type.
| |||||||||||
Returns a single value converter to be used in a specific field.
| |||||||||||
Whether this type is a simple immutable value (int, boolean, String, URL, etc.
| |||||||||||
How a class name should be represented in its serialized form.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
com.thoughtworks.xstream.mapper.MapperWrapper
| |||||||||||
From class
java.lang.Object
| |||||||||||
From interface
com.thoughtworks.xstream.mapper.Mapper
|
Returns which converter to use for an specific attribute in a type.
definedIn | the field's parent |
---|---|
attribute | the attribute name |
type | the type the converter should create |
Returns a single value converter to be used in a specific field.
fieldName | the field name |
---|---|
type | the field type |
definedIn | the type which defines this field |
Whether this type is a simple immutable value (int, boolean, String, URL, etc. Immutable types will be repeatedly written in the serialized stream, instead of using object references.
How a class name should be represented in its serialized form.