Top Description Fields Constructors Methods
org.glassfish.jaxb.runtime.v2.runtime

public abstract Class FilterTransducer<T>

extends Object
implements Transducer<T>
Class Inheritance
All Implemented Interfaces
org.glassfish.jaxb.runtime.v2.runtime.Transducer
Known Direct Subclasses
org.glassfish.jaxb.runtime.v2.runtime.InlineBinaryTransducer, org.glassfish.jaxb.runtime.v2.runtime.MimeTypedTransducer, org.glassfish.jaxb.runtime.v2.runtime.SchemaTypeTransducer, org.glassfish.jaxb.runtime.v2.model.impl.RuntimeModelBuilder.IDTransducerImpl
Imports
com.sun.istack.NotNull, org.glassfish.jaxb.runtime.api.AccessorException, org.xml.sax.SAXException, javax.xml.namespace.QName, javax.xml.stream.XMLStreamException, java.io.IOException

Transducer that delegates to another Transducer.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
protected final Transducer<T>

Constructor Summary

AccessConstructor and Description
protected

Method Summary

Modifier and TypeMethod and Description
public void
declareNamespace(T o, XMLSerializer w)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.declareNamespace.

Declares the namespace URIs used in the given value to w.

public QName
getTypeName(T instance)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.getTypeName.

Transducers implicitly work against a single XML type, but sometimes (most notably XMLGregorianCalendar, an instance may choose different XML types.

public T
parse(CharSequence lexical)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Converts the lexical representation to a value object.

public boolean
useNamespace()

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.useNamespace.

If true, this doesn't declare any namespace, and therefore declareNamespace(Object, XMLSerializer) is no-op.

public void
public void
writeText(XMLSerializer w, T o, String fieldName)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

coreback to summary
protected final Transducer<T> core

Constructor Detail

FilterTransducerback to summary
protected FilterTransducer(Transducer<T> core)

Method Detail

declareNamespaceback to summary
public void declareNamespace(T o, XMLSerializer w) throws AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.declareNamespace.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.declareNamespace.

Declares the namespace URIs used in the given value to w.

Annotations
@Override
getTypeNameback to summary
public QName getTypeName(T instance)

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.getTypeName.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.getTypeName.

Transducers implicitly work against a single XML type, but sometimes (most notably XMLGregorianCalendar, an instance may choose different XML types.

Annotations
@Override
parseback to summary
public T parse(CharSequence lexical) throws AccessorException, SAXException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.parse.

Converts the lexical representation to a value object.

Annotations
@Override
Exceptions
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 lexical form is incorrect, the error should be reported and SAXException may thrown (or it can return null to recover.)
useNamespaceback to summary
public boolean useNamespace()

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.useNamespace.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.useNamespace.

If true, this doesn't declare any namespace, and therefore declareNamespace(Object, XMLSerializer) is no-op. It also means that the parse(CharSequence) method won't use the context parameter.

Annotations
@Override
writeLeafElementback to summary
public void writeLeafElement(XMLSerializer w, Name tagName, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeLeafElement.

Sends the result of the print(Object) operation to one of the XMLSerializer#leafElement(Name, String, String) method. but with the best representation of the value, not necessarily String.

Annotations
@Override
writeTextback to summary
public void writeText(XMLSerializer w, T o, String fieldName) throws IOException, SAXException, XMLStreamException, AccessorException

Implements org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Doc from org.glassfish.jaxb.runtime.v2.runtime.Transducer.writeText.

Sends the result of the print(Object) operation to one of the XMLSerializer#text(String, String) method, but with the best representation of the value, not necessarily String.

Annotations
@Override