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

public final Class ListTransducedAccessorImpl<BeanT, ListT, ItemT, PackT>

extends DefaultTransducedAccessor<BeanT>
Class Inheritance
Imports
org.glassfish.jaxb.core.WhiteSpaceProcessor, org.glassfish.jaxb.runtime.api.AccessorException, org.glassfish.jaxb.runtime.v2.runtime.Transducer, .XMLSerializer, jakarta.xml.bind.JAXBException, org.xml.sax.SAXException

TransducedAccessor for a list simple type.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final Accessor<BeanT, ListT>
acc

Accessor to get/set the list.

private final Lister<BeanT, ListT, ItemT, PackT>
lister

Lister for handling list of tokens.

private final Transducer<ItemT>
xducer

Transducer for each item type.

Constructor Summary

AccessConstructor and Description
public
ListTransducedAccessorImpl(Transducer<ItemT> xducer, Accessor<BeanT, ListT> acc, Lister<BeanT, ListT, ItemT, PackT> lister)

Method Summary

Modifier and TypeMethod and Description
public void
declareNamespace(BeanT bean, XMLSerializer w)

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.declareNamespace.

Obtain the value of the field and declares the namespace URIs used in the value.

public boolean
hasValue(BeanT bean)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.hasValue.

Checks if the field has a value.

public void
parse(BeanT bean, CharSequence lexical)

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.parse.

Parses the text value into the responsible field of the given bean.

private void
processValue(BeanT bean, CharSequence s)

public boolean
Inherited from org.glassfish.jaxb.runtime.v2.runtime.reflect.DefaultTransducedAccessor:
writeLeafElementwriteText

Field Detail

accback to summary
private final Accessor<BeanT, ListT> acc

Accessor to get/set the list.

listerback to summary
private final Lister<BeanT, ListT, ItemT, PackT> lister

Lister for handling list of tokens.

xducerback to summary
private final Transducer<ItemT> xducer

Transducer for each item type.

Constructor Detail

ListTransducedAccessorImplback to summary
public ListTransducedAccessorImpl(Transducer<ItemT> xducer, Accessor<BeanT, ListT> acc, Lister<BeanT, ListT, ItemT, PackT> lister)

Method Detail

declareNamespaceback to summary
public void declareNamespace(BeanT bean, XMLSerializer w) throws AccessorException, SAXException

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.declareNamespace.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.declareNamespace.

Obtain the value of the field and declares the namespace URIs used in the value.

Annotations
@Override
hasValueback to summary
public boolean hasValue(BeanT bean) throws AccessorException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.hasValue.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.hasValue.

Checks if the field has a value.

Annotations
@Override
parseback to summary
public void parse(BeanT bean, CharSequence lexical) throws AccessorException, SAXException

Implements abstract org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.parse.

Doc from org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.parse.

Parses the text value into the responsible field of the given bean.

Use UnmarshallingContext#getInstance() to access to the namespace bindings

Annotations
@Override
Exceptions
AccessorException:
if the transducer is used to parse an user bean that uses XmlValue, then this exception may occur when it tries to set the leaf value to the bean.
SAXException:
if the parse method found an error, the error is reported, and then the processing is aborted.
processValueback to summary
private void processValue(BeanT bean, CharSequence s) throws AccessorException, SAXException
useNamespaceback to summary
public boolean useNamespace()

Overrides org.glassfish.jaxb.runtime.v2.runtime.reflect.TransducedAccessor.useNamespace.

Annotations
@Override