|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |
@Retention(value=RUNTIME) public @interface ElementArray
The ElementArray
annotation represents a method or
field that is an array of elements. The array deserialized is the
same type as the field or method, all entries within the array
must be a compatible type. However, a class
attribute
can be used to override an entry, this must be an assignable type.
<array length="3"> <entry> <value>example text value</value> </entry> <entry> <value>some other value</value> </entry> <entry/> </array>All null objects within the array are represented as an empty XML element so that they can be deserialized accurately. This ensures that the length attribute of the array is respected, as well as the index position of all serialized entries. The length of the array must be specified for deserialization to instantiate the array before the array values are instantiated. This is required to account for cyclical references in the object graph.
Optional Element Summary | |
---|---|
boolean |
data
This is used to determine whether the element data is written in a CDATA block or not. |
boolean |
empty
This is used to determine if an optional field or method can remain null if it does not exist. |
java.lang.String |
entry
This is used to provide a name of the XML element representing the entry within the array. |
java.lang.String |
name
This represents the name of the XML element. |
boolean |
required
Determines whether the element is required within the XML document. |
public abstract java.lang.String name
public abstract java.lang.String entry
public abstract boolean data
public abstract boolean required
public abstract boolean empty
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: REQUIRED | OPTIONAL | DETAIL: ELEMENT |