com.sun.xml.bind.v2.runtime.property
Class ArrayElementProperty<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>
              extended by com.sun.xml.bind.v2.runtime.property.ArrayElementProperty<BeanT,ListT,ItemT>
All Implemented Interfaces:
Property<BeanT>, StructureLoaderBuilder
Direct Known Subclasses:
ArrayElementLeafProperty, ArrayElementNodeProperty

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

Property implementation for multi-value property that maps to an element.


Nested Class Summary
 
Nested classes/interfaces inherited from class com.sun.xml.bind.v2.runtime.property.ArrayERProperty
ArrayERProperty.ReceiverImpl
 
Field Summary
protected  RuntimeElementPropertyInfo prop
          Set by the constructor and reset in the wrapUp() method.
 
Fields inherited from class com.sun.xml.bind.v2.runtime.property.ArrayERProperty
isWrapperNillable, wrapperTagName
 
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 ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop)
           
 
Method Summary
 void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders)
          Creates the unmarshaller to unmarshal the body.
 Accessor getElementPropertyAccessor(String nsUri, String localName)
          If this property is mapped to the specified element, return an accessor to it.
 PropertyKind getKind()
          Gets the Kind of property
protected abstract  void serializeItem(JaxBeanInfo expected, ItemT item, XMLSerializer w)
          Serializes one item of the property.
protected  void serializeListBody(BeanT beanT, XMLSerializer w, ListT list)
          Serializses the items of the list.
 void wrapUp()
          Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.
 
Methods inherited from class com.sun.xml.bind.v2.runtime.property.ArrayERProperty
buildChildElementUnmarshallers, serializeBody
 
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
hasSerializeURIAction, serializeURIs
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prop

protected RuntimeElementPropertyInfo prop
Set by the constructor and reset in the wrapUp() method.

Constructor Detail

ArrayElementProperty

protected ArrayElementProperty(JAXBContextImpl grammar,
                               RuntimeElementPropertyInfo prop)
Method Detail

wrapUp

public void wrapUp()
Description copied from interface: Property
Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.

Specified by:
wrapUp in interface Property<BeanT>
Overrides:
wrapUp in class PropertyImpl<BeanT>

serializeListBody

protected void serializeListBody(BeanT beanT,
                                 XMLSerializer w,
                                 ListT list)
                          throws IOException,
                                 javax.xml.stream.XMLStreamException,
                                 SAXException,
                                 AccessorException
Description copied from class: ArrayERProperty
Serializses the items of the list. This method is invoked after the necessary wrapper tag is produced (if necessary.)

Specified by:
serializeListBody in class ArrayERProperty<BeanT,ListT,ItemT>
list - always non-null.
Throws:
IOException
javax.xml.stream.XMLStreamException
SAXException
AccessorException

serializeItem

protected abstract void serializeItem(JaxBeanInfo expected,
                                      ItemT item,
                                      XMLSerializer w)
                               throws SAXException,
                                      AccessorException,
                                      IOException,
                                      javax.xml.stream.XMLStreamException
Serializes one item of the property.

Throws:
SAXException
AccessorException
IOException
javax.xml.stream.XMLStreamException

createBodyUnmarshaller

public void createBodyUnmarshaller(UnmarshallerChain chain,
                                   QNameMap<ChildLoader> loaders)
Description copied from class: ArrayERProperty
Creates the unmarshaller to unmarshal the body.

Specified by:
createBodyUnmarshaller in class ArrayERProperty<BeanT,ListT,ItemT>

getKind

public final PropertyKind getKind()
Description copied from interface: Property
Gets the Kind of property

Returns:
always non-null.

getElementPropertyAccessor

public Accessor getElementPropertyAccessor(String nsUri,
                                           String localName)
Description copied from interface: Property
If this property is mapped to the specified element, return an accessor to it.

Specified by:
getElementPropertyAccessor in interface Property<BeanT>
Overrides:
getElementPropertyAccessor in class PropertyImpl<BeanT>
Returns:
null if the property is not mapped to the specified element.