Top Description Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.runtime.unmarshaller

public final Class Scope<BeanT, PropT, ItemT, PackT>

extends Object
Class Inheritance
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, .Lister, org.xml.sax.SAXException

Holds the information about packing scope.

When no packing is started yet, all the fields should be set to null.

Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private Accessor<BeanT, PropT>
private BeanT
public final UnmarshallingContext
private Lister<BeanT, PropT, ItemT, PackT>
private PackT

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
add(Accessor<BeanT, PropT> acc, Lister<BeanT, PropT, ItemT, PackT> lister, ItemT value)

Adds a new item to this packing scope.

private boolean
public void
finish()

Finishes up the current packing in progress (if any) and resets this object.

public boolean
hasStarted()

Returns true if this scope object is filled by a packing in progress.

public void
reset()

Initializes all the fields to null.

public void
start(Accessor<BeanT, PropT> acc, Lister<BeanT, PropT, ItemT, PackT> lister)

Starts the packing scope, without adding any item.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

accback to summary
private Accessor<BeanT, PropT> acc
beanback to summary
private BeanT bean
contextback to summary
public final UnmarshallingContext context
listerback to summary
private Lister<BeanT, PropT, ItemT, PackT> lister
packback to summary
private PackT pack

Constructor Detail

Scopeback to summary
pack-priv Scope(UnmarshallingContext context)

Method Detail

addback to summary
public void add(Accessor<BeanT, PropT> acc, Lister<BeanT, PropT, ItemT, PackT> lister, ItemT value) throws SAXException

Adds a new item to this packing scope.

cleanback to summary
private boolean clean()
finishback to summary
public void finish() throws AccessorException

Finishes up the current packing in progress (if any) and resets this object.

hasStartedback to summary
public boolean hasStarted()

Returns true if this scope object is filled by a packing in progress.

resetback to summary
public void reset()

Initializes all the fields to null.

startback to summary
public void start(Accessor<BeanT, PropT> acc, Lister<BeanT, PropT, ItemT, PackT> lister) throws SAXException

Starts the packing scope, without adding any item. This allows us to return an empty pack, thereby allowing the user to distinguish empty array vs null array.