public class QNameTranslator extends IllegalArgumentExceptionSimpleValueTranslator<javax.xml.namespace.QName>
QName. If an instance of XMLReaderStreamDataProvider is specified when calling a
parser method, the namespace related to a possible prefix will be determined. Otherwise XMLConstants.NULL_NS_URI will be
set by default.MAX_STRING_REPRESENTATION_LENGTH| Constructor and Description |
|---|
QNameTranslator() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Class<javax.xml.namespace.QName> |
getObjectClass()
Returns the Java class of object instances created by this translator.
|
java.lang.String |
javaToRepresentation(java.lang.Object object,
WriterStreamDataProvider<?> streamDataProvider)
Converts the object by invoking its
Object.toString() method. |
protected javax.xml.namespace.QName |
parseValue(java.lang.String representation,
ReaderStreamDataProvider<?> streamDataProvider) |
representationToJavahasStringRepresentation, readXMLRepresentation, writeXMLRepresentationequals, hashCodepublic QNameTranslator()
public java.lang.Class<javax.xml.namespace.QName> getObjectClass()
ObjectTranslator
Note that ObjectTranslator.javaToRepresentation(Object, WriterStreamDataProvider) and ObjectTranslator.writeXMLRepresentation(XMLStreamWriter, Object, WriterStreamDataProvider) may also
accept instances of other classes. This is independent from the return value here.
protected javax.xml.namespace.QName parseValue(java.lang.String representation, ReaderStreamDataProvider<?> streamDataProvider) throws java.lang.IllegalArgumentException
parseValue in class IllegalArgumentExceptionSimpleValueTranslator<javax.xml.namespace.QName>java.lang.IllegalArgumentExceptionpublic java.lang.String javaToRepresentation(java.lang.Object object, WriterStreamDataProvider<?> streamDataProvider) throws java.lang.UnsupportedOperationException, java.lang.ClassCastException
SimpleValueTranslatorObject.toString() method.javaToRepresentation in interface ObjectTranslator<javax.xml.namespace.QName>javaToRepresentation in class SimpleValueTranslator<javax.xml.namespace.QName>object - the object to be convertedstreamDataProvider - TODOjava.lang.UnsupportedOperationException - if objects handled by this instance can only be represented as XMLjava.lang.ClassCastException - if the specified object is not an instance of the supported class or does not implement the supported
interfaceObjectTranslator.javaToRepresentation(java.lang.Object, WriterStreamDataProvider)