org.simpleframework.xml
Annotation Type Order


@Retention(value=RUNTIME)
public @interface Order

The Order annotation is used to specify the order of appearance of XML elements and attributes. When used it ensures that on serialization the XML generated is predictable. By default serialization of fields is done in declaration order.

Author:
Niall Gallagher

Optional Element Summary
 java.lang.String[] attributes
          Specifies the appearance order of the XML attributes within the generated document.
 java.lang.String[] elements
          Specifies the appearance order of the XML elements within the generated document.
 

elements

public abstract java.lang.String[] elements
Specifies the appearance order of the XML elements within the generated document. This overrides the default order used, which is the declaration order within the class. If an element is not specified within this array then its order will be the appearance order directly after the last specified element.

Returns:
an ordered array of elements representing order
Default:
{}

attributes

public abstract java.lang.String[] attributes
Specifies the appearance order of the XML attributes within the generated document. This overrides the default order used, which is the declaration order within the class. If an attribute is not specified within this array then its order will be the appearance order directly after the last specified attribute.

Returns:
an ordered array of attributes representing order
Default:
{}