public class SchemaTypeTransducer<V> extends FilterTransducer<V>
Transducer that signals the runtime that this datatype
is marshalled to a different XML Schema type.
This transducer is used to implement the semantics of XmlSchemaType annotation.
XMLSerializer.schemaTypecore| Constructor and Description |
|---|
SchemaTypeTransducer(Transducer<V> core,
QName schemaType) |
| Modifier and Type | Method and Description |
|---|---|
CharSequence |
print(V o)
Converts the given value to its lexical representation.
|
void |
writeLeafElement(XMLSerializer w,
Name tagName,
V o,
String fieldName)
Sends the result of the
Transducer.print(Object) operation
to one of the XMLSerializer.leafElement(Name, String, String) method. |
void |
writeText(XMLSerializer w,
V o,
String fieldName)
Sends the result of the
Transducer.print(Object) operation
to one of the XMLSerializer.text(String, String) method,
but with the best representation of the value, not necessarily String. |
declareNamespace, getTypeName, isDefault, parse, useNamespacepublic SchemaTypeTransducer(Transducer<V> core, QName schemaType)
public CharSequence print(V o) throws AccessorException
Transducerprint in interface Transducer<V>print in class FilterTransducer<V>o - never be null.AccessorExceptionpublic void writeText(XMLSerializer w, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException
TransducerTransducer.print(Object) operation
to one of the XMLSerializer.text(String, String) method,
but with the best representation of the value, not necessarily String.writeText in interface Transducer<V>writeText in class FilterTransducer<V>IOExceptionSAXExceptionXMLStreamExceptionAccessorExceptionpublic void writeLeafElement(XMLSerializer w, Name tagName, V o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException
TransducerTransducer.print(Object) operation
to one of the XMLSerializer.leafElement(Name, String, String) method.
but with the best representation of the value, not necessarily String.writeLeafElement in interface Transducer<V>writeLeafElement in class FilterTransducer<V>IOExceptionSAXExceptionXMLStreamExceptionAccessorExceptionCopyright © 2018 JBoss by Red Hat. All rights reserved.