Class DynamicMethodMatcher

  extended by
All Implemented Interfaces:
Direct Known Subclasses:

public abstract class DynamicMethodMatcher
extends Object
implements MethodMatcher

Convenient abstract superclass for dynamic method matchers, which do care about arguments at runtime.

Field Summary
Fields inherited from interface org.springframework.aop.MethodMatcher
Constructor Summary
Method Summary
 boolean isRuntime()
          Is this MethodMatcher dynamic?
 boolean matches(Method method, Class targetClass)
          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

Constructor Detail


public DynamicMethodMatcher()
Method Detail


public final boolean isRuntime()
Description copied from interface: MethodMatcher
Is this MethodMatcher dynamic? Must a final call be made on the matches(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,

Note: Could be pulled up into a Matcher super-interface to apply to fields also.

Specified by:
isRuntime in interface MethodMatcher
whether or not a runtime matche via the 3-arg matches() method is required if static matching passed.


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
method - the candidate method
targetClass - target class (may be null, in which case the candidate class must be taken to be the method's declaring class)
whether or not this method matches statically

Copyright (c) 2002-2005 The Spring Framework Project.