Class Lister.CollectionLister<BeanT,T extends Collection>
java.lang.Object
com.sun.xml.bind.v2.runtime.reflect.Lister<BeanT,T,Object,T>
com.sun.xml.bind.v2.runtime.reflect.Lister.CollectionLister<BeanT,T>
public static final class Lister.CollectionLister<BeanT,T extends Collection>
extends Lister<BeanT,T,Object,T>
Lister
for a collection-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.xml.bind.v2.runtime.reflect.Lister
Lister.CollectionLister<BeanT,
T extends Collection>, Lister.IDREFSIterator, Lister.Pack<ItemT> -
Field Summary
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Once theLister.startPacking(BeanT, com.sun.xml.bind.v2.runtime.reflect.Accessor<BeanT, PropT>)
is called, you can add values to the pack by using this method.void
Finally, call this method to wraps up thepack
.iterator
(T collection, XMLSerializer context) Iterates values of a multi-value property.void
Clears the values of the property.startPacking
(BeanT bean, Accessor<BeanT, T> acc) Setting values to a multi-value property starts by creating a transient object called "pack" from the current field.Methods inherited from class com.sun.xml.bind.v2.runtime.reflect.Lister
create, getErrorInstance
-
Constructor Details
-
CollectionLister
-
-
Method Details
-
iterator
Description copied from class:Lister
Iterates values of a multi-value property.- Specified by:
iterator
in classLister<BeanT,
T extends Collection, Object, T extends Collection> context
- This parameter is used to support ID/IDREF handling.
-
startPacking
Description copied from class:Lister
Setting values to a multi-value property starts by creating a transient object called "pack" from the current field.- Specified by:
startPacking
in classLister<BeanT,
T extends Collection, Object, T extends Collection> - Throws:
AccessorException
-
addToPack
Description copied from class:Lister
Once theLister.startPacking(BeanT, com.sun.xml.bind.v2.runtime.reflect.Accessor<BeanT, PropT>)
is called, you can add values to the pack by using this method.- Specified by:
addToPack
in classLister<BeanT,
T extends Collection, Object, T extends Collection>
-
endPacking
Description copied from class:Lister
Finally, call this method to wraps up thepack
. This method may update the field of the given bean.- Specified by:
endPacking
in classLister<BeanT,
T extends Collection, Object, T extends Collection> - Throws:
AccessorException
-
reset
Description copied from class:Lister
Clears the values of the property.- Specified by:
reset
in classLister<BeanT,
T extends Collection, Object, T extends Collection> - Throws:
AccessorException
-