java.lang.Object | |
↳ | com.thoughtworks.xstream.converters.reflection.SortableFieldKeySorter |
The default implementation for sorting fields. Invoke registerFieldOrder in order to set the field order for an specific type.
Public Constructors | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Registers the field order to use for a specific type.
| |||||||||||
Sort the fields of a type.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
java.lang.Object
| |||||||||||
From interface
com.thoughtworks.xstream.converters.reflection.FieldKeySorter
|
Registers the field order to use for a specific type. This will not affect any of the type's super or sub classes. If you skip a field which will be serialized, XStream will thrown an StreamException during the serialization process.
type | the type |
---|---|
fields | the field order |
Sort the fields of a type. The method will be called with the class type that contains all the fields and a Map that retains the order in which the elements have been added. The sequence in which elements are returned by an iterator defines the processing order of the fields. An implementation may create a different Map with similar semantic, add all elements of the original map and return the new one.
type | the class that contains all the fields |
---|---|
keyedByFieldKey | a Map containing a FieldKey as key element and a
Field as value. |