public class DefaultAnnotationResolver extends Object implements AnnotationResolver
AnnotationResolverimplementation that merely inspects the
target method, and returns
getAnnotation(class). Unfortunately Java's default reflection API for Annotations is not very robust, and this logic may not be enough - if the incoming method invocation represents a method from an interface, this default logic would not discover the annotation if it existed on the method implementation directly (as opposed to being defined directly in the interface definition). More complex class hierarchy traversal logic is required to exhaust a method's target object's classes, parent classes, interfaces and parent interfaces. That logic will likely be added to this implementation in due time, but for now, this implementation relies on the JDK's default
|Constructor and Description|
public Annotation getAnnotation(MethodInvocation mi, Class<? extends Annotation> clazz)
Copyright © 2004-2013 The Apache Software Foundation. All Rights Reserved.