Package org.simpleframework.xml.core
Class Collector
java.lang.Object
org.simpleframework.xml.core.Collector
The
Collector
object is used to store variables for
a deserialized object. Each variable contains the label and value
for a field or method. The Composite
object uses
this to store deserialized values before committing them to the
objects methods and fields.- See Also:
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static class
TheRegistry
object is used to store variables for the collector. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Collector.Registry
This is the registry that contains variables mapped to paths.private final Collector.Registry
This is the registry containing all the variables collected. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
This is used to set the values for the methods and fields of the specified object.This is used to get theVariable
that represents a deserialized object.This is used to get theVariable
that represents a deserialized object.iterator()
This is used to acquire an iterator over the named variables.This is used to remove theVariable
from this criteria object.This is used to resolve theVariable
by using the union names of a label.void
This is used to create aVariable
and set it for this criteria.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Field Details
-
registry
This is the registry containing all the variables collected. -
alias
This is the registry that contains variables mapped to paths.
-
-
Constructor Details
-
Collector
public Collector()Constructor for theCollector
object. This is used to store variables for an objects fields and methods. Each variable is stored using the name of the label.
-
-
Method Details
-
get
This is used to get theVariable
that represents a deserialized object. The variable contains all the meta data for the field or method and the value that is to be set on the method or field. -
get
This is used to get theVariable
that represents a deserialized object. The variable contains all the meta data for the field or method and the value that is to be set on the method or field. -
resolve
This is used to resolve theVariable
by using the union names of a label. This will also acquire variables based on the actual name of the variable. -
remove
This is used to remove theVariable
from this criteria object. When removed, the variable will no longer be used to set the method or field when thecommit
method is invoked. -
iterator
This is used to acquire an iterator over the named variables. Providing anIterator
allows the criteria to be used in a for each loop. This is primarily for convenience. -
set
This is used to create aVariable
and set it for this criteria. The variable can be retrieved at a later stage using the name of the label. This allows for repeat reads as the variable can be used to acquire the labels converter. -
commit
This is used to set the values for the methods and fields of the specified object. Invoking this performs the population of an object being deserialized. It ensures that each value is set after the XML element has been fully read.
-