Package org.simpleframework.xml.core
Interface Criteria
-
- All Superinterfaces:
java.lang.Iterable<java.lang.Object>
- All Known Implementing Classes:
Collector
interface Criteria extends java.lang.Iterable<java.lang.Object>
TheCriteria
object represents the criteria used to create an object and populate its methods and fields. This allows all deserialized information for a single object to be stored in a single location. All deserialized variables are accessible from theget
method.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description void
commit(java.lang.Object source)
This is used to set the values for the methods and fields of the specified object.Variable
get(java.lang.Object key)
This is used to get theVariable
that represents a deserialized object.Variable
get(Label label)
This is used to get theVariable
that represents a deserialized object.Variable
remove(java.lang.Object key)
This is used to remove theVariable
from this criteria object.Variable
resolve(java.lang.String path)
This is used to resolve theVariable
by using the union names of a label.void
set(Label label, java.lang.Object value)
This is used to create aVariable
and set it for this criteria.
-
-
-
Method Detail
-
get
Variable get(java.lang.Object key) throws java.lang.Exception
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.- Parameters:
key
- this is the key of the variable to be acquired- Returns:
- this returns the keyed variable if it exists
- Throws:
java.lang.Exception
-
get
Variable get(Label label) throws java.lang.Exception
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.- Parameters:
label
- this is the label to acquire the variable for- Returns:
- this returns the variable associated with the label
- Throws:
java.lang.Exception
-
resolve
Variable resolve(java.lang.String path) throws java.lang.Exception
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.- Parameters:
path
- this is the path of the variable to be acquired- Returns:
- this returns the variable mapped to the path
- Throws:
java.lang.Exception
-
remove
Variable remove(java.lang.Object key) throws java.lang.Exception
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.- Parameters:
key
- this is the key associated with the variable- Returns:
- this returns the keyed variable if it exists
- Throws:
java.lang.Exception
-
set
void set(Label label, java.lang.Object value) throws java.lang.Exception
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.- Parameters:
label
- this is the label used to create the pointervalue
- this is the value of the object to be read- Throws:
java.lang.Exception
-
commit
void commit(java.lang.Object source) throws java.lang.Exception
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.- Parameters:
source
- this is the object that is to be populated- Throws:
java.lang.Exception
-
-