Class Lister.CollectionLister<BeanT,T extends java.util.Collection>
- java.lang.Object
-
- com.sun.xml.bind.v2.runtime.reflect.Lister<BeanT,T,java.lang.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 java.util.Collection>, Lister.IDREFSIterator, Lister.Pack<ItemT>
-
-
Constructor Summary
Constructors Constructor Description CollectionLister(java.lang.Class<? extends T> implClass)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addToPack(T collection, java.lang.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
-
-
-
-
Constructor Detail
-
CollectionLister
public CollectionLister(java.lang.Class<? extends T> implClass)
-
-
Method Detail
-
iterator
public ListIterator iterator(T collection, XMLSerializer context)
Description copied from class:Lister
Iterates values of a multi-value property.
-
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 java.util.Collection,java.lang.Object,T extends java.util.Collection>
- Throws:
AccessorException
-
addToPack
public void addToPack(T collection, java.lang.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.
-
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 java.util.Collection,java.lang.Object,T extends java.util.Collection>
- Throws:
AccessorException
-
-