Top Description Fields Constructors Methods
org.springframework.aop

pack-priv final Class TrueMethodMatcher

extends Object
implements MethodMatcher, Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable, org.springframework.aop.MethodMatcher
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, java.lang.reflect.Method

Canonical MethodMatcher instance that matches all methods.
Author
Rod Johnson

Field Summary

Modifier and TypeField and Description
public static final TrueMethodMatcher

Constructor Summary

AccessConstructor and Description
private
TrueMethodMatcher()

Enforce Singleton pattern.

Method Summary

Modifier and TypeMethod and Description
public 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 boolean
matches(Method
the candidate method
method
,
Class<?>
the target class
targetClass
)

Implements org.springframework.aop.MethodMatcher.matches.

Perform static checking to determine whether the given method matches.
public 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.
private Object
readResolve()

Required to support serialization.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAllwaitwaitwait

Field Detail

INSTANCEback to summary
public static final TrueMethodMatcher INSTANCE

Constructor Detail

TrueMethodMatcherback to summary
private TrueMethodMatcher()

Enforce Singleton pattern.

Method Detail

isRuntimeback to summary
public 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 boolean matches(Method method, Class<?> targetClass)

Implements org.springframework.aop.MethodMatcher.matches.

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

Perform static checking to determine whether the given method matches.

If this method returns false or if isRuntime() returns false, no runtime check (i.e. no matches(Method, Class, Object[]) call) will be made.

Parameters
method:Method

the candidate method

targetClass:Class<?>

the target class

Returns:boolean

whether this method matches statically

Annotations
@Override
matchesback to summary
public 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
readResolveback to summary
private Object readResolve()

Required to support serialization. Replaces with canonical instance on deserialization, protecting Singleton pattern. Alternative to overriding equals().

toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object.

Returns:String

a string representation of the object.

Annotations
@Override