Package org.springframework.aop.support
Class DynamicMethodMatcher
java.lang.Object
org.springframework.aop.support.DynamicMethodMatcher
- All Implemented Interfaces:
MethodMatcher
- Direct Known Subclasses:
DynamicMethodMatcherPointcut
Convenient abstract superclass for dynamic method matchers,
which do care about arguments at runtime.
- Author:
- Rod Johnson
-
Field Summary
Fields inherited from interface org.springframework.aop.MethodMatcher
TRUE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Is thisMethodMatcher
dynamic, that is, must a final check be made via theMethodMatcher.matches(Method, Class, Object[])
method at runtime even ifMethodMatcher.matches(Method, Class)
returnstrue
?boolean
Can override to add preconditions for dynamic matching.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.aop.MethodMatcher
matches
-
Constructor Details
-
DynamicMethodMatcher
public DynamicMethodMatcher()
-
-
Method Details
-
isRuntime
public final boolean isRuntime()Description copied from interface:MethodMatcher
Is thisMethodMatcher
dynamic, that is, must a final check be made via theMethodMatcher.matches(Method, Class, Object[])
method at runtime even ifMethodMatcher.matches(Method, Class)
returnstrue
?Can be invoked when an AOP proxy is created, and need not be invoked again before each method invocation.
- Specified by:
isRuntime
in interfaceMethodMatcher
- Returns:
- whether a runtime match via
MethodMatcher.matches(Method, Class, Object[])
is required if static matching passed
-
matches
Can override to add preconditions for dynamic matching. This implementation always returns true.- Specified by:
matches
in interfaceMethodMatcher
- Parameters:
method
- the candidate methodtargetClass
- the target class- Returns:
- whether this method matches statically
-