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 TypeMethodDescriptionbooleanChecks if the field has a value.voidparse(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.voidwriteLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName) Convenience method to write the value as a text inside an element without any attributes.voidwriteText(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:TransducedAccessorPrints the responsible field of the given bean to the writer.Use
XMLSerializer.getInstance()to access to the namespace bindings- Specified by:
printin classTransducedAccessor<BeanT>- Returns:
- if the accessor didn't yield a value, return null.
- Throws:
AccessorException
-
parse
Description copied from class:TransducedAccessorParses the text value into the responsible field of the given bean.Use
UnmarshallingContext.getInstance()to access to the namespace bindings- Specified by:
parsein 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:TransducedAccessorChecks if the field has a value.- Specified by:
hasValuein 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:TransducedAccessorConvenience 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:
writeLeafElementin classTransducedAccessor<BeanT>- Throws:
SAXExceptionAccessorExceptionIOExceptionXMLStreamException
-
writeText
public void writeText(XMLSerializer w, BeanT o, String fieldName) throws AccessorException, SAXException, IOException, XMLStreamException Description copied from class:TransducedAccessorInvokes one of theXMLSerializer.text(String, String)method with the representation of data bested suited for this transduced accessor.- Specified by:
writeTextin classTransducedAccessor<BeanT>- Throws:
AccessorExceptionSAXExceptionIOExceptionXMLStreamException
-