public static class TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT> extends TransducedAccessor<BeanT>
TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT>| Modifier and Type | Field | Description |
|---|---|---|
protected Accessor<BeanT,ValueT> |
acc |
|
protected Transducer<ValueT> |
xducer |
| Constructor | Description |
|---|---|
CompositeTransducedAccessorImpl(JAXBContextImpl context,
Transducer<ValueT> xducer,
Accessor<BeanT,ValueT> acc) |
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
hasValue(BeanT bean) |
Checks if the field has a value.
|
void |
parse(BeanT bean,
java.lang.CharSequence lexical) |
Parses the text value into the responsible field of the given bean.
|
java.lang.CharSequence |
print(BeanT bean) |
Prints the responsible field of the given bean to the writer.
|
void |
writeLeafElement(XMLSerializer w,
Name tagName,
BeanT o,
java.lang.String fieldName) |
Convenience method to write the value as a text inside an element
without any attributes.
|
void |
writeText(XMLSerializer w,
BeanT o,
java.lang.String fieldName) |
Invokes one of the
XMLSerializer.text(String, String) method
with the representation of data bested suited for this transduced accessor. |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitdeclareNamespace, get, useNamespaceprotected final Transducer<ValueT> xducer
public CompositeTransducedAccessorImpl(JAXBContextImpl context, Transducer<ValueT> xducer, Accessor<BeanT,ValueT> acc)
public java.lang.CharSequence print(BeanT bean) throws AccessorException
TransducedAccessor
Use XMLSerializer.getInstance() to access to the namespace bindings
print in class TransducedAccessor<BeanT>AccessorExceptionpublic void parse(BeanT bean, java.lang.CharSequence lexical) throws AccessorException, org.xml.sax.SAXException
TransducedAccessor
Use UnmarshallingContext.getInstance() to access to the namespace bindings
parse in class TransducedAccessor<BeanT>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.org.xml.sax.SAXException - if the parse method found an error, the error is reported, and then
the processing is aborted.public boolean hasValue(BeanT bean) throws AccessorException
TransducedAccessorhasValue in class TransducedAccessor<BeanT>AccessorExceptionpublic void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, java.lang.String fieldName) throws org.xml.sax.SAXException, AccessorException, java.io.IOException, javax.xml.stream.XMLStreamException
TransducedAccessorThe callee assumes that there's an associated value in the field. No @xsi:type handling is expected.
writeLeafElement in class TransducedAccessor<BeanT>org.xml.sax.SAXExceptionAccessorExceptionjava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionpublic void writeText(XMLSerializer w, BeanT o, java.lang.String fieldName) throws AccessorException, org.xml.sax.SAXException, java.io.IOException, javax.xml.stream.XMLStreamException
TransducedAccessorXMLSerializer.text(String, String) method
with the representation of data bested suited for this transduced accessor.writeText in class TransducedAccessor<BeanT>AccessorExceptionorg.xml.sax.SAXExceptionjava.io.IOExceptionjavax.xml.stream.XMLStreamExceptionCopyright © 2017 Oracle Corporation. All rights reserved.