com.sun.xml.bind.v2.runtime
Class SchemaTypeTransducer<V>
java.lang.Object
com.sun.xml.bind.v2.runtime.FilterTransducer<V>
com.sun.xml.bind.v2.runtime.SchemaTypeTransducer<V>
- All Implemented Interfaces:
- Transducer<V>
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.
- Author:
- Kohsuke Kawaguchi
- See Also:
XMLSerializer.schemaType
|
Method Summary |
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. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchemaTypeTransducer
public SchemaTypeTransducer(Transducer<V> core,
QName schemaType)
print
public CharSequence print(V o)
throws AccessorException
- Description copied from interface:
Transducer
- Converts the given value to its lexical representation.
- Specified by:
print in interface Transducer<V>- Overrides:
print in class FilterTransducer<V>
- Parameters:
o - never be null.
- Returns:
- always non-null valid lexical representation.
- Throws:
AccessorException
writeText
public void writeText(XMLSerializer w,
V o,
String fieldName)
throws IOException,
SAXException,
XMLStreamException,
AccessorException
- Description copied from interface:
Transducer
- 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.
- Specified by:
writeText in interface Transducer<V>- Overrides:
writeText in class FilterTransducer<V>
- Throws:
IOException
SAXException
XMLStreamException
AccessorException
writeLeafElement
public void writeLeafElement(XMLSerializer w,
Name tagName,
V o,
String fieldName)
throws IOException,
SAXException,
XMLStreamException,
AccessorException
- Description copied from interface:
Transducer
- Sends the result of the
Transducer.print(Object) operation
to one of the XMLSerializer.leafElement(Name, String, String) method.
but with the best representation of the value, not necessarily String.
- Specified by:
writeLeafElement in interface Transducer<V>- Overrides:
writeLeafElement in class FilterTransducer<V>
- Throws:
IOException
SAXException
XMLStreamException
AccessorException
Copyright © 2005-2015 Oracle Corporation. All Rights Reserved.