Module com.sun.xml.bind
Class Scope<BeanT,PropT,ItemT,PackT>
- java.lang.Object
-
- org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Scope<BeanT,PropT,ItemT,PackT>
-
public final class Scope<BeanT,PropT,ItemT,PackT> extends Object
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
Fields Modifier and Type Field Description UnmarshallingContextcontext
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister, ItemT value)Adds a new item to this packing scope.voidfinish()Finishes up the current packing in progress (if any) and resets this object.booleanhasStarted()Returns true if this scope object is filled by a packing in progress.voidreset()Initializes all the fields to null.voidstart(Accessor<BeanT,PropT> acc, Lister<BeanT,PropT,ItemT,PackT> lister)Starts the packing scope, without adding any item.
-
-
-
Field Detail
-
context
public final UnmarshallingContext context
-
-
Method Detail
-
hasStarted
public boolean hasStarted()
Returns true if this scope object is filled by a packing in progress.
-
reset
public void reset()
Initializes all the fields to null.
-
finish
public void finish() throws AccessorExceptionFinishes up the current packing in progress (if any) and resets this object.- Throws:
AccessorException
-
add
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.- Throws:
SAXException
-
start
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.- Throws:
SAXException
-
-