org.mule.module.xml.transformer.jaxb
Class JAXBContextResolver
java.lang.Object
org.mule.config.transformer.AbstractAnnotatedTransformerArgumentResolver
org.mule.module.xml.transformer.jaxb.JAXBContextResolver
- All Implemented Interfaces:
- Disposable, org.mule.config.transformer.TransformerArgumentResolver
public class JAXBContextResolver
- extends org.mule.config.transformer.AbstractAnnotatedTransformerArgumentResolver
This resolver is used by the transform engine to inject a JAXBContext into a method that requires it.
A shared JAXB context can be created for the application and stored in the registry, this will get injected
into any transform methods that add JAXBContext to the method signature.
IF there is no shared JAXB context one will be created. First this resolver will attempt to create the context from
the package of the the annotated class, for this to work either a jaxb.index file must be present or an ObjectFactory
must be in the package. This allows for JAXB generated classes to be used easily. If this method fails a context will
be created using just the annotated class to initialise the context.
- Since:
- 3.0
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JAXBContextResolver
public JAXBContextResolver()
getArgumentClass
protected Class getArgumentClass()
- Specified by:
getArgumentClass in class org.mule.config.transformer.AbstractAnnotatedTransformerArgumentResolver
createArgument
protected Object createArgument(Class annotatedType,
MuleContext muleContext)
throws Exception
- Specified by:
createArgument in class org.mule.config.transformer.AbstractAnnotatedTransformerArgumentResolver
- Throws:
Exception
getAnnotationsPackageName
protected String getAnnotationsPackageName()
- Specified by:
getAnnotationsPackageName in class org.mule.config.transformer.AbstractAnnotatedTransformerArgumentResolver
Copyright © 2003–2014 MuleSoft, Inc.. All rights reserved.