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

pack-priv final Class ValueListBeanInfoImpl

extends JaxBeanInfo
Class Inheritance
Imports
com.sun.istack.FinalArrayList, org.glassfish.jaxb.core.WhiteSpaceProcessor, org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.runtime.v2.runtime.unmarshaller.Loader, .UnmarshallingContext, jakarta.xml.bind.JAXBException, .ValidationEvent, jakarta.xml.bind.helpers.ValidationEventImpl, org.xml.sax.SAXException, javax.xml.stream.XMLStreamException, java.io.IOException, java.lang.reflect.Array, java.util.List

JaxBeanInfo implementation that binds T[] to a list of simple types.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final Class<T>
private final Loader
private final Transducer<ValueT>
Inherited from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo:
flagisNilIncludedjaxbType

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public Object
createInstance(UnmarshallingContext context)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.createInstance.

Creates a new instance of the bean.

public String
getElementLocalName(Object array)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getElementLocalName.

Returns the local name portion of the element name, if the bean that this class represents is mapped from/to an XML element.

public String
getElementNamespaceURI(Object array)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getElementNamespaceURI.

Returns the namespace URI portion of the element name, if the bean that this class represents is mapped from/to an XML element.

public String
getId(Object array, XMLSerializer target)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getId.

Gets the ID value of the given bean, if it has an ID value.

public Loader
getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getLoader.

Gets the Loader that will unmarshall the given object.

public Transducer<ValueT>
getTransducer()

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getTransducer.

If the bean's representation in XML is just a text, this method return a Transducer that lets you convert values between the text and the bean.

public boolean
reset(Object array, UnmarshallingContext context)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.reset.

Resets the object to the initial state, as if the object is created fresh.

public void
serializeAttributes(Object array, XMLSerializer target)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeAttributes.

Serializes attributes into the specified target.

public void
serializeBody(Object array, XMLSerializer target)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeBody.

Serializes child elements and texts into the specified target.

public void
serializeRoot(Object array, XMLSerializer target)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeRoot.

Serializes the bean as the root element.

public void
serializeURIs(Object array, XMLSerializer target)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeURIs.

Declares all the namespace URIs this object is using at its top-level scope into the specified target.

private Object
toArray(List<E> list)

Inherited from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo:
getLifecycleMethodsgetTypeNamegetTypeNameshasAfterMarshalMethodhasAfterUnmarshalMethodhasBeforeMarshalMethodhasBeforeUnmarshalMethodhasElementOnlyContentModelhasElementOnlyContentModelinvokeAfterUnmarshalMethodinvokeBeforeUnmarshalMethodisElementisImmutableisNilIncludedlinklookForLifecycleMethodssetLifecycleFlagswrapUp

Field Detail

itemTypeback to summary
private final Class<T> itemType
loaderback to summary
private final Loader loader
xducerback to summary
private final Transducer<ValueT> xducer

Constructor Detail

ValueListBeanInfoImplback to summary
public ValueListBeanInfoImpl(JAXBContextImpl owner, Class<T> arrayType) throws JAXBException

Method Detail

createInstanceback to summary
public Object createInstance(UnmarshallingContext context)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.createInstance.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.createInstance.

Creates a new instance of the bean.

This operation is only supported when isImmutable is false.

Annotations
@Override
getElementLocalNameback to summary
public String getElementLocalName(Object array)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getElementLocalName.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getElementLocalName.

Returns the local name portion of the element name, if the bean that this class represents is mapped from/to an XML element.

Annotations
@Override
getElementNamespaceURIback to summary
public String getElementNamespaceURI(Object array)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getElementNamespaceURI.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getElementNamespaceURI.

Returns the namespace URI portion of the element name, if the bean that this class represents is mapped from/to an XML element.

Annotations
@Override
getIdback to summary
public String getId(Object array, XMLSerializer target)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getId.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getId.

Gets the ID value of the given bean, if it has an ID value. Otherwise return null.

Annotations
@Override
getLoaderback to summary
public Loader getLoader(JAXBContextImpl context, boolean typeSubstitutionCapable)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getLoader.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getLoader.

Gets the Loader that will unmarshall the given object.

Annotations
@Override
getTransducerback to summary
public Transducer<ValueT> getTransducer()

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getTransducer.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.getTransducer.

If the bean's representation in XML is just a text, this method return a Transducer that lets you convert values between the text and the bean.

Annotations
@Override
resetback to summary
public boolean reset(Object array, UnmarshallingContext context)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.reset.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.reset.

Resets the object to the initial state, as if the object is created fresh.

This is used to reuse an existing object for unmarshalling.

Annotations
@Override
serializeAttributesback to summary
public void serializeAttributes(Object array, XMLSerializer target)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeAttributes.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeAttributes.

Serializes attributes into the specified target.

Annotations
@Override
serializeBodyback to summary
public void serializeBody(Object array, XMLSerializer target) throws SAXException, IOException, XMLStreamException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeBody.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeBody.

Serializes child elements and texts into the specified target.

Annotations
@Override
serializeRootback to summary
public void serializeRoot(Object array, XMLSerializer target) throws SAXException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeRoot.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeRoot.

Serializes the bean as the root element.

In the java-to-schema binding, an object might marshal in two different ways depending on whether it is used as the root of the graph or not. In the former case, an object could marshal as an element, whereas in the latter case, it marshals as a type.

This method is used to marshal the root of the object graph to allow this semantics to be implemented.

It is doubtful to me if it's a good idea for an object to marshal in two ways depending on the context.

For schema-to-java, this is equivalent to serializeBody(Object, XMLSerializer).

Annotations
@Override
serializeURIsback to summary
public void serializeURIs(Object array, XMLSerializer target) throws SAXException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeURIs.

Doc from org.glassfish.jaxb.runtime.v2.runtime.JaxBeanInfo.serializeURIs.

Declares all the namespace URIs this object is using at its top-level scope into the specified target.

Annotations
@Override
toArrayback to summary
private Object toArray(List<E> list)