|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.runtime.reflect.Lister<BeanT,PropT,ItemT,PackT>
public abstract class Lister<BeanT,PropT,ItemT,PackT>
Used to list individual values of a multi-value property, and to pack individual values into a multi-value property.
Nested Class Summary | |
---|---|
static class |
Lister.CollectionLister<BeanT,T extends java.util.Collection>
Lister for a collection |
static class |
Lister.IDREFSIterator
Iterator for IDREFS lister. |
static class |
Lister.Pack<ItemT>
|
Field Summary | |
---|---|
static Lister |
ERROR
|
Constructor Summary | |
---|---|
protected |
Lister()
|
Method Summary | ||
---|---|---|
abstract void |
addToPack(PackT pack,
ItemT newValue)
Once the startPacking(BeanT, com.sun.xml.bind.v2.runtime.reflect.Accessor is called, you can
add values to the pack by using this method. |
|
static
|
create(java.lang.reflect.Type fieldType,
ID idness,
Adapter<java.lang.reflect.Type,java.lang.Class> adapter)
Gets a reference to the appropriate Lister object
if the field is a multi-value field. |
|
abstract void |
endPacking(PackT pack,
BeanT bean,
Accessor<BeanT,PropT> acc)
Finally, call this method to wraps up the pack . |
|
static
|
getErrorInstance()
Gets the special Lister used to recover from an error. |
|
abstract ListIterator<ItemT> |
iterator(PropT multiValueProp,
XMLSerializer context)
Iterates values of a multi-value property. |
|
abstract void |
reset(BeanT o,
Accessor<BeanT,PropT> acc)
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. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final Lister ERROR
Constructor Detail |
---|
protected Lister()
Method Detail |
---|
public abstract ListIterator<ItemT> iterator(PropT multiValueProp, XMLSerializer context)
context
- This parameter is used to support ID/IDREF handling.public abstract PackT startPacking(BeanT bean, Accessor<BeanT,PropT> acc) throws AccessorException
AccessorException
public abstract void addToPack(PackT pack, ItemT newValue) throws AccessorException
startPacking(BeanT, com.sun.xml.bind.v2.runtime.reflect.Accessor)
is called, you can
add values to the pack by using this method.
AccessorException
public abstract void endPacking(PackT pack, BeanT bean, Accessor<BeanT,PropT> acc) throws AccessorException
pack
. This method may update the field of
the given bean.
AccessorException
public abstract void reset(BeanT o, Accessor<BeanT,PropT> acc) throws AccessorException
AccessorException
public static <BeanT,PropT,ItemT,PackT> Lister<BeanT,PropT,ItemT,PackT> create(java.lang.reflect.Type fieldType, ID idness, Adapter<java.lang.reflect.Type,java.lang.Class> adapter)
Lister
object
if the field is a multi-value field. Otherwise null.
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.public static <A,B,C,D> Lister<A,B,C,D> getErrorInstance()
Lister
used to recover from an error.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |