|
||||||||||
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 java.lang.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 java.lang.Object |
createArgument(java.lang.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(java.lang.Class annotatedType)
|
|
protected abstract java.lang.String |
getAnnotationsPackageName()
This resolver scans a class for annotations in this package. |
|
protected abstract java.lang.Class<?> |
getArgumentClass()
The object type that this resolver will discover or create |
|
java.util.Set<java.lang.Class> |
getMatchingClasses()
|
|
java.util.Set<java.lang.Class> |
getNonMatchingClasses()
|
|
protected boolean |
isNonMatching(DataType source,
DataType result)
|
|
|
resolve(java.lang.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 java.lang.String[] ignoredPackages
protected final transient Log logger
Constructor Detail |
---|
public AbstractAnnotatedTransformerArgumentResolver()
Method Detail |
---|
public <T> T resolve(java.lang.Class<T> type, DataType source, DataType result, MuleContext context) throws java.lang.Exception
resolve
in interface TransformerArgumentResolver
java.lang.Exception
protected boolean findAnnotation(java.lang.Class annotatedType) throws java.io.IOException
java.io.IOException
protected boolean isNonMatching(DataType source, DataType result)
public void dispose()
Disposable
dispose
in interface Disposable
public java.util.Set<java.lang.Class> getMatchingClasses()
public java.util.Set<java.lang.Class> getNonMatchingClasses()
protected abstract java.lang.Class<?> getArgumentClass()
protected abstract java.lang.Object createArgument(java.lang.Class<?> annotatedType, MuleContext muleContext) throws java.lang.Exception
getArgumentClass()
this method will be invoked
an instance of the object.
annotatedType
- the annotated object that was matchedmuleContext
- the current Mule context.
java.lang.Exception
- if the object cannot be createdprotected abstract java.lang.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 |