public class JAXBContextResolver extends AbstractAnnotatedTransformerArgumentResolver
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.ignoredPackages, logger
PHASE_NAME
Constructor and Description |
---|
JAXBContextResolver() |
Modifier and Type | Method and Description |
---|---|
protected Object |
createArgument(Class annotatedType,
MuleContext muleContext)
If the resolver cannot locate the required object of type
AbstractAnnotatedTransformerArgumentResolver.getArgumentClass() this method will be invoked
an instance of the object. |
protected String |
getAnnotationsPackageName()
This resolver scans a class for annotations in this package.
|
protected Class |
getArgumentClass()
The object type that this resolver will discover or create
|
dispose, findAnnotation, getMatchingClasses, getNonMatchingClasses, isNonMatching, resolve
protected Class getArgumentClass()
AbstractAnnotatedTransformerArgumentResolver
getArgumentClass
in class AbstractAnnotatedTransformerArgumentResolver
protected Object createArgument(Class annotatedType, MuleContext muleContext) throws Exception
AbstractAnnotatedTransformerArgumentResolver
AbstractAnnotatedTransformerArgumentResolver.getArgumentClass()
this method will be invoked
an instance of the object.createArgument
in class AbstractAnnotatedTransformerArgumentResolver
annotatedType
- the annotated object that was matchedmuleContext
- the current Mule context.Exception
- if the object cannot be createdprotected String getAnnotationsPackageName()
AbstractAnnotatedTransformerArgumentResolver
AbstractAnnotatedTransformerArgumentResolver.findAnnotation(Class)
method and search based on your own criteriagetAnnotationsPackageName
in class AbstractAnnotatedTransformerArgumentResolver
Copyright © 2003–2016 MuleSoft, Inc.. All rights reserved.