Class Lister<BeanT,PropT,ItemT,PackT>
java.lang.Object
com.sun.xml.bind.v2.runtime.reflect.Lister<BeanT,PropT,ItemT,PackT>
- Direct Known Subclasses:
Lister.CollectionLister
Used to list individual values of a multi-value property, and
to pack individual values into a multi-value property.
- Author:
- Kohsuke Kawaguchi (kk@kohsuke.org)
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
Lister.CollectionLister<BeanT,
T extends Collection> Lister
for a collectionstatic final class
Iterator
for IDREFS lister.static final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract void
Once thestartPacking(BeanT, com.sun.xml.bind.v2.runtime.reflect.Accessor<BeanT, PropT>)
is called, you can add values to the pack by using this method.static <BeanT,
PropT, ItemT, PackT>
Lister<BeanT,PropT, ItemT, PackT> Gets a reference to the appropriateLister
object if the field is a multi-value field.abstract void
Finally, call this method to wraps up thepack
.static <A,
B, C, D> Lister<A, B, C, D> Gets the specialLister
used to recover from an error.abstract ListIterator<ItemT>
iterator
(PropT multiValueProp, XMLSerializer context) Iterates values of a multi-value property.abstract void
Clears the values of the property.abstract PackT
startPacking
(BeanT bean, Accessor<BeanT, PropT> acc) Setting values to a multi-value property starts by creating a transient object called "pack" from the current field.
-
Field Details
-
ERROR
-
-
Constructor Details
-
Lister
protected Lister()
-
-
Method Details
-
iterator
Iterates values of a multi-value property.- Parameters:
context
- This parameter is used to support ID/IDREF handling.
-
startPacking
Setting values to a multi-value property starts by creating a transient object called "pack" from the current field.- Throws:
AccessorException
-
addToPack
Once thestartPacking(BeanT, com.sun.xml.bind.v2.runtime.reflect.Accessor<BeanT, PropT>)
is called, you can add values to the pack by using this method.- Throws:
AccessorException
-
endPacking
public abstract void endPacking(PackT pack, BeanT bean, Accessor<BeanT, PropT> acc) throws AccessorExceptionFinally, call this method to wraps up thepack
. This method may update the field of the given bean.- Throws:
AccessorException
-
reset
Clears the values of the property.- Throws:
AccessorException
-
create
public static <BeanT,PropT, Lister<BeanT,ItemT, PackT> PropT, createItemT, PackT> (Type fieldType, ID idness, Adapter<Type, Class> adapter) Gets a reference to the appropriateLister
object if the field is a multi-value field. Otherwise null.- Parameters:
fieldType
- the type of the field that stores the collectionidness
- ID-ness of the property.adapter
- adapter to be used for individual items. can be null.
-
getErrorInstance
Gets the specialLister
used to recover from an error.
-