Package org.simpleframework.xml.core
Class Variable.Adapter
java.lang.Object
org.simpleframework.xml.core.Variable.Adapter
- Enclosing class:
Variable
The
Adapter
object is used to call the repeater
with the original deserialized object. Using this object the
converter interface can be used to perform repeat reads for
the object. This must be given a Repeater
in
order to invoke the repeat read method.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThisread
method will perform a read using the provided object with the repeater.Thisread
method will perform a read using the provided object with the repeater.boolean
Thisread
method will perform a read using the provided object with the repeater.void
write
(OutputNode node, Object value) Thiswrite
method acts like any other write in that it passes on the node and source object to write.
-
Field Details
-
reader
This is the converter object used to perform a repeat read. -
value
This is the originally deserialized object value to use. -
label
This contains the details for the annotated field or method.
-
-
Constructor Details
-
Adapter
Constructor for theAdapter
object. This will create an adapter between the converter an repeater such that the reads will read from the XML to the original.- Parameters:
reader
- this is the converter object to be usedvalue
- this is the originally deserialized object
-
-
Method Details
-
read
Thisread
method will perform a read using the provided object with the repeater. Reading with this method ensures that any additional XML elements within the source will be added to the value. -
read
Thisread
method will perform a read using the provided object with the repeater. Reading with this method ensures that any additional XML elements within the source will be added to the value.- Specified by:
read
in interfaceConverter
- Specified by:
read
in interfaceRepeater
- Parameters:
node
- this is the node that contains the extra datavalue
- this is the value to read the objects in to- Returns:
- this will return the original deserialized object
- Throws:
Exception
- if a deserialized type cannot be instantiated
-
validate
Thisread
method will perform a read using the provided object with the repeater. Reading with this method ensures that any additional XML elements within the source will be added to the value. -
write
Thiswrite
method acts like any other write in that it passes on the node and source object to write. Typically this will not be used as the repeater object is used for repeat reads of scattered XML elements.
-