org.springframework.aop.support.annotation
Class AnnotationMethodMatcher
java.lang.Object
org.springframework.aop.support.StaticMethodMatcher
org.springframework.aop.support.annotation.AnnotationMethodMatcher
- All Implemented Interfaces:
- MethodMatcher
public class AnnotationMethodMatcher
- extends StaticMethodMatcher
Simple MethodMatcher that looks for a specific Java 5 annotation
being present on a method.
- Since:
- 2.0
- Author:
- Juergen Hoeller
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AnnotationMethodMatcher
public AnnotationMethodMatcher(Class<? extends Annotation> annotationType)
- Create a new AnnotationClassFilter for the given annotation type.
- Parameters:
annotationType
- the annotation type to look for
matches
public boolean matches(Method method,
Class targetClass)
- Description copied from interface:
MethodMatcher
- Perform static checking. If this returns false, or if the isRuntime() method
returns false, no runtime check will be made.
- Parameters:
method
- the candidate methodtargetClass
- target class (may be null
, in which case the candidate
class must be taken to be the method's declaring class)
- Returns:
- whether or not this method matches statically
Copyright © 2002-2007 The Spring Framework.