Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.thoughtworks.xstream.converters.reflection
Class NativeFieldKeySorter

    java.lang.Object
      com.thoughtworks.xstream.converters.reflection.NativeFieldKeySorter

All Implemented Interfaces:
  FieldKeySorter

    public class NativeFieldKeySorter

extends Object
implements FieldKeySorter

Sort the fields in their natural order. Fields are returned in their declaration order, fields of base classes first.

Since:
  1.2.2
Author:
  Jörg Schaible

Constructor Summary
`NativeFieldKeySorter()`

Method Summary
`Map` | `sort(Class type, Map keyedByFieldKey)` Sort the fields of a type.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NativeFieldKeySorter

    public NativeFieldKeySorter()

Method Detail

### sort

    public Map sort(Class type,
                    Map keyedByFieldKey)

  Description copied from interface: `FieldKeySorter`
  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.

  Specified by:
    `sort` in interface `FieldKeySorter`
  Parameters:
    `type` - the class that contains all the fields
    `keyedByFieldKey` - a Map containing a `FieldKey` as key element and a `Field` as value.
  Returns:
    a Map with all the entries of the original Map

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2004-2008 XStream. All Rights Reserved.