com.sun.xml.bind.v2.runtime.property
Class ArrayERProperty<BeanT,ListT,ItemT>

java.lang.Object
  extended by com.sun.xml.bind.v2.runtime.property.PropertyImpl<BeanT>
      extended by com.sun.xml.bind.v2.runtime.property.ArrayProperty<BeanT,ListT,ItemT>
          extended by com.sun.xml.bind.v2.runtime.property.ArrayERProperty<BeanT,ListT,ItemT>
All Implemented Interfaces:
Property<BeanT>, StructureLoaderBuilder
Direct Known Subclasses:
ArrayElementProperty, ArrayReferenceNodeProperty

abstract class ArrayERProperty<BeanT,ListT,ItemT>
extends ArrayProperty<BeanT,ListT,ItemT>

Commonality between ArrayElementProperty and ArrayReferenceNodeProperty. Mostly handles the unmarshalling of the wrapper element.


Nested Class Summary
protected  class ArrayERProperty.ReceiverImpl
          Receiver that puts the child object into the Scope object.
 
Field Summary
protected  boolean isWrapperNillable
          True if the wrapper tag name is nillable.
protected  Name wrapperTagName
          Wrapper tag name if any, or null.
 
Fields inherited from class com.sun.xml.bind.v2.runtime.property.ArrayProperty
acc, lister
 
Fields inherited from class com.sun.xml.bind.v2.runtime.property.PropertyImpl
fieldName
 
Fields inherited from interface com.sun.xml.bind.v2.runtime.property.StructureLoaderBuilder
CATCH_ALL, TEXT_HANDLER
 
Constructor Summary
protected ArrayERProperty(JAXBContextImpl grammar, RuntimePropertyInfo prop, QName tagName, boolean isWrapperNillable)
           
 
Method Summary
 void buildChildElementUnmarshallers(UnmarshallerChain chain, QNameMap<ChildLoader> loaders)
          Every Property class has an implementation of buildChildElementUnmarshallers which will fill in the specified QNameMap by elements that are expected by this property.
protected abstract  void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders)
          Creates the unmarshaller to unmarshal the body.
 void serializeBody(BeanT o, XMLSerializer w, Object outerPeer)
           
protected abstract  void serializeListBody(BeanT o, XMLSerializer w, ListT list)
          Serializses the items of the list.
 
Methods inherited from class com.sun.xml.bind.v2.runtime.property.ArrayProperty
getIdValue, reset
 
Methods inherited from class com.sun.xml.bind.v2.runtime.property.PropertyImpl
getElementPropertyAccessor, hasSerializeURIAction, serializeURIs, wrapUp
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.sun.xml.bind.v2.runtime.property.Property
getKind
 

Field Detail

wrapperTagName

protected final Name wrapperTagName
Wrapper tag name if any, or null.


isWrapperNillable

protected final boolean isWrapperNillable
True if the wrapper tag name is nillable. Always false if wrapperTagName==null.

Constructor Detail

ArrayERProperty

protected ArrayERProperty(JAXBContextImpl grammar,
                          RuntimePropertyInfo prop,
                          QName tagName,
                          boolean isWrapperNillable)
Method Detail

serializeBody

public final void serializeBody(BeanT o,
                                XMLSerializer w,
                                Object outerPeer)
                         throws SAXException,
                                AccessorException,
                                IOException,
                                javax.xml.stream.XMLStreamException
Specified by:
serializeBody in interface Property<BeanT>
Overrides:
serializeBody in class PropertyImpl<BeanT>
outerPeer - used when this property is expected to print out an element and that should be associated with this outer peer. normally null. this is only used for JaxBeanInfo for JAXBElements.
Throws:
AccessorException - If thrown, caught by the caller and reported.
SAXException
IOException
javax.xml.stream.XMLStreamException
See Also:
JaxBeanInfo.serializeBody(Object, XMLSerializer)

serializeListBody

protected abstract void serializeListBody(BeanT o,
                                          XMLSerializer w,
                                          ListT list)
                                   throws IOException,
                                          javax.xml.stream.XMLStreamException,
                                          SAXException,
                                          AccessorException
Serializses the items of the list. This method is invoked after the necessary wrapper tag is produced (if necessary.)

Parameters:
list - always non-null.
Throws:
IOException
javax.xml.stream.XMLStreamException
SAXException
AccessorException

createBodyUnmarshaller

protected abstract void createBodyUnmarshaller(UnmarshallerChain chain,
                                               QNameMap<ChildLoader> loaders)
Creates the unmarshaller to unmarshal the body.


buildChildElementUnmarshallers

public final void buildChildElementUnmarshallers(UnmarshallerChain chain,
                                                 QNameMap<ChildLoader> loaders)
Description copied from interface: StructureLoaderBuilder
Every Property class has an implementation of buildChildElementUnmarshallers which will fill in the specified QNameMap by elements that are expected by this property.