Class TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT>
java.lang.Object
com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor<BeanT>
com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT>
- Enclosing class:
TransducedAccessor<BeanT>
public static class TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT>
extends TransducedAccessor<BeanT>
-
Nested Class Summary
Nested classes/interfaces inherited from class com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor
TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,
ValueT> -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCompositeTransducedAccessorImpl
(JAXBContextImpl context, Transducer<ValueT> xducer, Accessor<BeanT, ValueT> acc) -
Method Summary
Modifier and TypeMethodDescriptionboolean
Checks if the field has a value.void
parse
(BeanT bean, CharSequence lexical) Parses the text value into the responsible field of the given bean.Prints the responsible field of the given bean to the writer.void
writeLeafElement
(XMLSerializer w, Name tagName, BeanT o, String fieldName) Convenience method to write the value as a text inside an element without any attributes.void
writeText
(XMLSerializer w, BeanT o, String fieldName) Invokes one of theXMLSerializer.text(String, String)
method with the representation of data bested suited for this transduced accessor.Methods inherited from class com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor
declareNamespace, get, useNamespace
-
Field Details
-
xducer
-
acc
-
-
Constructor Details
-
CompositeTransducedAccessorImpl
public CompositeTransducedAccessorImpl(JAXBContextImpl context, Transducer<ValueT> xducer, Accessor<BeanT, ValueT> acc)
-
-
Method Details
-
print
Description copied from class:TransducedAccessor
Prints the responsible field of the given bean to the writer.Use
XMLSerializer.getInstance()
to access to the namespace bindings- Specified by:
print
in classTransducedAccessor<BeanT>
- Returns:
- if the accessor didn't yield a value, return null.
- Throws:
AccessorException
-
parse
Description copied from class:TransducedAccessor
Parses the text value into the responsible field of the given bean.Use
UnmarshallingContext.getInstance()
to access to the namespace bindings- Specified by:
parse
in classTransducedAccessor<BeanT>
- Throws:
AccessorException
- if the transducer is used to parse an user bean that usesXmlValue
, 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.
-
hasValue
Description copied from class:TransducedAccessor
Checks if the field has a value.- Specified by:
hasValue
in classTransducedAccessor<BeanT>
- Throws:
AccessorException
-
writeLeafElement
public void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName) throws SAXException, AccessorException, IOException, XMLStreamException Description copied from class:TransducedAccessor
Convenience method to write the value as a text inside an element without any attributes. Can be overridden for improved performance.The callee assumes that there's an associated value in the field. No @xsi:type handling is expected.
- Specified by:
writeLeafElement
in classTransducedAccessor<BeanT>
- Throws:
SAXException
AccessorException
IOException
XMLStreamException
-
writeText
public void writeText(XMLSerializer w, BeanT o, String fieldName) throws AccessorException, SAXException, IOException, XMLStreamException Description copied from class:TransducedAccessor
Invokes one of theXMLSerializer.text(String, String)
method with the representation of data bested suited for this transduced accessor.- Specified by:
writeText
in classTransducedAccessor<BeanT>
- Throws:
AccessorException
SAXException
IOException
XMLStreamException
-