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>
-
-
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>
-
-
Constructor Summary
Constructors Constructor Description CollectionLister(Class<? extends T> implClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToPack(T collection, Object o)
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
endPacking(T collection, BeanT bean, Accessor<BeanT,T> acc)
Finally, call this method to wraps up thepack
.ListIterator
iterator(T collection, XMLSerializer context)
Iterates values of a multi-value property.void
reset(BeanT bean, Accessor<BeanT,T> acc)
Clears the values of the property.T
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
-
-
-
-
Method Detail
-
iterator
public ListIterator iterator(T collection, XMLSerializer context)
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
public T startPacking(BeanT bean, Accessor<BeanT,T> acc) throws AccessorException
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
public void addToPack(T collection, Object o)
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
public void endPacking(T collection, BeanT bean, Accessor<BeanT,T> acc) throws AccessorException
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
public void reset(BeanT bean, Accessor<BeanT,T> acc) throws AccessorException
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
-
-