Top Description Constructors Methods
org.springframework.aop.support

public abstract Class StaticMethodMatcher

extends Object
implements MethodMatcher
Class Inheritance
All Implemented Interfaces
org.springframework.aop.MethodMatcher
Known Direct Subclasses
org.springframework.aop.support.StaticMethodMatcherPointcut, org.springframework.aop.support.annotation.AnnotationMethodMatcher, org.springframework.aop.aspectj.AbstractAspectJAdvice.AdviceExcludingMethodMatcher
Imports
java.lang.reflect.Method, org.springframework.aop.MethodMatcher

Convenient abstract superclass for static method matchers, which don't care about arguments at runtime.
Author
Rod Johnson

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public final boolean
isRuntime()

Implements org.springframework.aop.MethodMatcher.isRuntime.

Is this MethodMatcher dynamic, that is, must a final check be made via the matches(Method, Class, Object[]) method at runtime even if matches(Method, Class) returns true?

public final boolean
matches(Method
the candidate method
method
,
Class<?>
the target class
targetClass
,
Object...
arguments to the method
args
)

Implements org.springframework.aop.MethodMatcher.matches.

Check whether there is a runtime (dynamic) match for this method, which must have matched statically.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StaticMethodMatcherback to summary
public StaticMethodMatcher()

Method Detail

isRuntimeback to summary
public final boolean isRuntime()

Implements org.springframework.aop.MethodMatcher.isRuntime.

Doc from org.springframework.aop.MethodMatcher.isRuntime.

Is this MethodMatcher dynamic, that is, must a final check be made via the matches(Method, Class, Object[]) method at runtime even if matches(Method, Class) returns true?

Can be invoked when an AOP proxy is created, and need not be invoked again before each method invocation.

Returns:boolean

whether a runtime match via matches(Method, Class, Object[]) is required if static matching passed

Annotations
@Override
matchesback to summary
public final boolean matches(Method method, Class<?> targetClass, Object... args)

Implements org.springframework.aop.MethodMatcher.matches.

Doc from org.springframework.aop.MethodMatcher.matches.

Check whether there is a runtime (dynamic) match for this method, which must have matched statically.

This method is invoked only if matches(Method, Class) returns true for the given method and target class, and if isRuntime() returns true.

Invoked immediately before potential running of the advice, after any advice earlier in the advice chain has run.

Parameters
method:Method

the candidate method

targetClass:Class<?>

the target class

args:Object[]

arguments to the method

Returns:boolean

whether there's a runtime match

Annotations
@Override