org.mule.module.xml.transformer.jaxb
Class JAXBMarshallerTransformer
java.lang.Object
org.mule.transformer.AbstractTransformer
org.mule.module.xml.transformer.jaxb.JAXBMarshallerTransformer
- All Implemented Interfaces:
- AnnotatedObject, MuleContextAware, Disposable, Initialisable, NameableObject, NamedObject, MessageProcessor, Transformer, EndpointAware
public class JAXBMarshallerTransformer
- extends AbstractTransformer
Allows marshaling of Java objects to XML using JAXB 2. A specific sourceClass can be set on this transformer, this
is the expected source object type. If no external JAXBContext is set on the transformer, but
the 'sourceClass' is set, a JAXBContext will be created using the sourceClass.
- Since:
- 3.0
| Methods inherited from class org.mule.transformer.AbstractTransformer |
dispose, generateTransformerName, getAnnotation, getAnnotations, getEncoding, getEncoding, getEndpoint, getMimeType, getName, getReturnClass, getReturnDataType, getSourceDataTypes, getSourceTypes, isAcceptNull, isAllowNullReturn, isConsumed, isIgnoreBadInput, isSourceDataTypeSupported, isSourceDataTypeSupported, isSourceTypeSupported, isSourceTypeSupported, process, registerSourceType, registerSourceType, setAllowNullReturn, setAnnotations, setEncoding, setEndpoint, setIgnoreBadInput, setMimeType, setMuleContext, setName, setReturnClass, setReturnDataType, toString, transform, transform, unregisterSourceType, unregisterSourceType |
jaxbContext
protected JAXBContext jaxbContext
sourceClass
protected Class<?> sourceClass
JAXBMarshallerTransformer
public JAXBMarshallerTransformer()
JAXBMarshallerTransformer
public JAXBMarshallerTransformer(JAXBContext jaxbContext,
DataType returnType)
initialise
public void initialise()
throws InitialisationException
- Specified by:
initialise in interface Initialisable- Overrides:
initialise in class AbstractTransformer
- Throws:
InitialisationException
doTransform
protected Object doTransform(Object src,
String encoding)
throws TransformerException
- Specified by:
doTransform in class AbstractTransformer
- Throws:
TransformerException
getJaxbContext
public JAXBContext getJaxbContext()
setJaxbContext
public void setJaxbContext(JAXBContext jaxbContext)
getSourceClass
public Class<?> getSourceClass()
setSourceClass
public void setSourceClass(Class<?> sourceClass)
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.