当前页面:
在线文档首页 >
Spring Framework 2.0.5 API 文档英文版
DynamicMethodMatcher (Spring Framework API 2.0) - Spring Framework 2.0.5 API 文档英文版
org.springframework.aop.support
Class DynamicMethodMatcher
java.lang.Object
org.springframework.aop.support.DynamicMethodMatcher
- All Implemented Interfaces:
- MethodMatcher
- Direct Known Subclasses:
- DynamicMethodMatcherPointcut
public abstract class DynamicMethodMatcher
- extends Object
- implements MethodMatcher
Convenient abstract superclass for dynamic method matchers,
which do care about arguments at runtime.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DynamicMethodMatcher
public DynamicMethodMatcher()
isRuntime
public final boolean isRuntime()
- Description copied from interface:
MethodMatcher
- Is this MethodMatcher dynamic, that is, must a final call be made on the
MethodMatcher.matches(java.lang.reflect.Method, Class, Object[])
method at
runtime even if the 2-arg matches method returns true
?
Can be invoked when an AOP proxy is created, and need not be invoked
again before each method invocation,
- Specified by:
isRuntime
in interface MethodMatcher
- Returns:
- whether or not a runtime match via the 3-arg
MethodMatcher.matches(java.lang.reflect.Method, Class, Object[])
method
is required if static matching passed
matches
public boolean matches(Method method,
Class targetClass)
- Can override to add preconditions for dynamic matching. This implementation
always returns true.
- Specified by:
matches
in interface MethodMatcher
- Parameters:
method
- the candidate methodtargetClass
- the 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.