|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.mule.config.transformer.AbstractAnnotatedTransformerArgumentResolver
public abstract class AbstractAnnotatedTransformerArgumentResolver
An abstract resolver that can be extend to resolve/create an object based on Annotated classes. These classes can be scanned and used to create the context. Typically this class will be used to create resolvers for binding frameworks where the data type classes are annotated with binding information.
Field Summary | |
---|---|
static String[] |
ignoredPackages
|
protected Log |
logger
logger used by this class |
Fields inherited from interface org.mule.api.lifecycle.Disposable |
---|
PHASE_NAME |
Constructor Summary | |
---|---|
AbstractAnnotatedTransformerArgumentResolver()
|
Method Summary | ||
---|---|---|
protected abstract Object |
createArgument(Class<?> annotatedType,
MuleContext muleContext)
If the resolver cannot locate the required object of type getArgumentClass() this method will be invoked
an instance of the object. |
|
void |
dispose()
A lifecycle method where implementor should free up any resources. |
|
protected boolean |
findAnnotation(Class annotatedType)
|
|
protected abstract String |
getAnnotationsPackageName()
This resolver scans a class for annotations in this package. |
|
protected abstract Class<?> |
getArgumentClass()
The object type that this resolver will discover or create |
|
Set<Class> |
getMatchingClasses()
|
|
Set<Class> |
getNonMatchingClasses()
|
|
protected boolean |
isNonMatching(DataType source,
DataType result)
|
|
|
resolve(Class<T> type,
DataType source,
DataType result,
MuleContext context)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] ignoredPackages
protected final transient Log logger
Constructor Detail |
---|
public AbstractAnnotatedTransformerArgumentResolver()
Method Detail |
---|
public <T> T resolve(Class<T> type, DataType source, DataType result, MuleContext context) throws Exception
resolve
in interface TransformerArgumentResolver
Exception
protected boolean findAnnotation(Class annotatedType) throws IOException
IOException
protected boolean isNonMatching(DataType source, DataType result)
public void dispose()
Disposable
dispose
in interface Disposable
public Set<Class> getMatchingClasses()
public Set<Class> getNonMatchingClasses()
protected abstract Class<?> getArgumentClass()
protected abstract Object createArgument(Class<?> annotatedType, MuleContext muleContext) throws Exception
getArgumentClass()
this method will be invoked
an instance of the object.
annotatedType
- the annotated object that was matchedmuleContext
- the current Mule context.
Exception
- if the object cannot be createdprotected abstract String getAnnotationsPackageName()
findAnnotation(Class)
method and search based on your own criteria
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |