|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.bind.v2.runtime.reflect.TransducedAccessor<BeanT>
com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT>
static class TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT>
Implementation of TransducedAccessor
that
simply combines a Transducer
and Accessor
.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.sun.xml.bind.v2.runtime.reflect.TransducedAccessor |
---|
TransducedAccessor.CompositeContextDependentTransducedAccessorImpl<BeanT,ValueT>, TransducedAccessor.CompositeTransducedAccessorImpl<BeanT,ValueT> |
Field Summary | |
---|---|
protected Accessor<BeanT,ValueT> |
acc
|
protected Transducer<ValueT> |
xducer
|
Constructor Summary | |
---|---|
TransducedAccessor.CompositeTransducedAccessorImpl(JAXBContextImpl context,
Transducer<ValueT> xducer,
Accessor<BeanT,ValueT> acc)
|
Method Summary | |
---|---|
boolean |
hasValue(BeanT bean)
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. |
CharSequence |
print(BeanT 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 the XMLSerializer.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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final Transducer<ValueT> xducer
protected final Accessor<BeanT,ValueT> acc
Constructor Detail |
---|
public TransducedAccessor.CompositeTransducedAccessorImpl(JAXBContextImpl context, Transducer<ValueT> xducer, Accessor<BeanT,ValueT> acc)
Method Detail |
---|
public CharSequence print(BeanT bean) throws AccessorException
TransducedAccessor
Use XMLSerializer.getInstance()
to access to the namespace bindings
print
in class TransducedAccessor<BeanT>
AccessorException
public void parse(BeanT bean, CharSequence lexical) throws AccessorException, 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.
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
TransducedAccessor
hasValue
in class TransducedAccessor<BeanT>
AccessorException
public void writeLeafElement(XMLSerializer w, Name tagName, BeanT o, String fieldName) throws SAXException, AccessorException, IOException, javax.xml.stream.XMLStreamException
TransducedAccessor
The callee assumes that there's an associated value in the field. No @xsi:type handling is expected.
writeLeafElement
in class TransducedAccessor<BeanT>
SAXException
AccessorException
IOException
javax.xml.stream.XMLStreamException
public void writeText(XMLSerializer w, BeanT o, String fieldName) throws AccessorException, SAXException, IOException, javax.xml.stream.XMLStreamException
TransducedAccessor
XMLSerializer.text(String, String)
method
with the representation of data bested suited for this transduced accessor.
writeText
in class TransducedAccessor<BeanT>
AccessorException
SAXException
IOException
javax.xml.stream.XMLStreamException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |