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

pack-priv abstract Class ArrayElementProperty<BeanT, ListT, ItemT>

extends ArrayERProperty<BeanT, ListT, ItemT>
Class Inheritance
Known Direct Subclasses
org.glassfish.jaxb.runtime.v2.runtime.property.ArrayElementLeafProperty, org.glassfish.jaxb.runtime.v2.runtime.property.ArrayElementNodeProperty
Imports
org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.core.v2.model.core.PropertyKind, .TypeRef, org.glassfish.jaxb.runtime.v2.model.runtime.RuntimeElementPropertyInfo, .RuntimeTypeRef, org.glassfish.jaxb.core.v2.runtime.RuntimeUtil, org.glassfish.jaxb.runtime.v2.runtime.*, org.glassfish.jaxb.runtime.v2.runtime.reflect.Accessor, .ListIterator, .Lister, .NullSafeAccessor, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.*, org.glassfish.jaxb.runtime.v2.util.QNameMap, jakarta.xml.bind.JAXBException, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, java.io.IOException, java.lang.reflect.Type, java.util.HashMap, .List, .Map

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

Field Summary

Modifier and TypeField and Description
private final Name
nillableTagName

Tag name used when we see null in the collection.

protected RuntimeElementPropertyInfo
prop

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

private Map<TypeRef<Type, Class<T>>, JaxBeanInfo<BeanT>>
refs

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

private final Map<Class<T>, TagAndType>
Inherited from org.glassfish.jaxb.runtime.v2.runtime.property.ArrayERProperty:
isWrapperNillablewrapperTagName

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
private Loader
createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef)

Creates a loader handler that unmarshals the body of the item.

public Accessor<BeanT, ValueT>
public final PropertyKind
protected abstract void
serializeItem(JaxBeanInfo<BeanT> expected, ItemT item, XMLSerializer w)

Serializes one item of the property.

protected void
serializeListBody(BeanT beanT, XMLSerializer w, ListT list)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.property.ArrayERProperty.serializeListBody.

Serializes the items of the list.

public void
wrapUp()

Overrides org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl.wrapUp.

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.wrapUp.

Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.

Inherited from org.glassfish.jaxb.runtime.v2.runtime.property.ArrayERProperty:
buildChildElementUnmarshallersserializeBody

Field Detail

nillableTagNameback to summary
private final Name nillableTagName

Tag name used when we see null in the collection. Can be null.

propback to summary
protected RuntimeElementPropertyInfo prop

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

refsback to summary
private Map<TypeRef<Type, Class<T>>, JaxBeanInfo<BeanT>> refs

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

typeMapback to summary
private final Map<Class<T>, TagAndType> typeMap

Constructor Detail

ArrayElementPropertyback to summary
protected ArrayElementProperty(JAXBContextImpl grammar, RuntimeElementPropertyInfo prop)

Method Detail

createBodyUnmarshallerback to summary
public void createBodyUnmarshaller(UnmarshallerChain chain, QNameMap<ChildLoader> loaders)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.property.ArrayERProperty.createBodyUnmarshaller.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.ArrayERProperty.createBodyUnmarshaller.

Creates the unmarshaler to unmarshal the body.

Annotations
@Override
createItemUnmarshallerback to summary
private Loader createItemUnmarshaller(UnmarshallerChain chain, RuntimeTypeRef typeRef)

Creates a loader handler that unmarshals the body of the item.

This will be sandwiched into <item> ... </item>.

When unmarshalling the body of item, the Pack of Lister is available as the handler state.

getElementPropertyAccessorback to summary
public Accessor<BeanT, ValueT> getElementPropertyAccessor(String nsUri, String localName)

Overrides org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl.getElementPropertyAccessor.

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.getElementPropertyAccessor.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.getElementPropertyAccessor.

If this property is mapped to the specified element, return an accessor to it.

Annotations
@Override
getKindback to summary
public final PropertyKind getKind()

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.getKind.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.getKind.

Gets the Kind of property

Annotations
@Override
serializeItemback to summary
protected abstract void serializeItem(JaxBeanInfo<BeanT> expected, ItemT item, XMLSerializer w) throws SAXException, AccessorException, IOException, XMLStreamException

Serializes one item of the property.

serializeListBodyback to summary
protected void serializeListBody(BeanT beanT, XMLSerializer w, ListT list) throws IOException, XMLStreamException, SAXException, AccessorException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.property.ArrayERProperty.serializeListBody.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.ArrayERProperty.serializeListBody.

Serializes the items of the list. This method is invoked after the necessary wrapper tag is produced (if necessary.)

Annotations
@Override
wrapUpback to summary
public void wrapUp()

Overrides org.glassfish.jaxb.runtime.v2.runtime.property.PropertyImpl.wrapUp.

Implements org.glassfish.jaxb.runtime.v2.runtime.property.Property.wrapUp.

Doc from org.glassfish.jaxb.runtime.v2.runtime.property.Property.wrapUp.

Called at the end of the JAXBContext initialization phase to clean up any unnecessary references.

Annotations
@Override