Top Description Inners Fields Constructors Methods
org.springframework.aop.support

public abstract Class Pointcuts

extends Object
Class Inheritance
Imports
java.io.Serializable, java.lang.reflect.Method, org.springframework.aop.MethodMatcher, .Pointcut, org.springframework.util.Assert

Pointcut constants for matching getters and setters, and static methods useful for manipulating and evaluating pointcuts.

These methods are particularly useful for composing pointcuts using the union and intersection methods.

Authors
Rod Johnson, Juergen Hoeller

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
Pointcuts.GetterPointcut

Pointcut implementation that matches bean property getters.

private static class
Pointcuts.SetterPointcut

Pointcut implementation that matches bean property setters.

Field Summary

Modifier and TypeField and Description
public static final Pointcut
GETTERS

Pointcut matching all bean property getters, in any class.

public static final Pointcut
SETTERS

Pointcut matching all bean property setters, in any class.

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public static Pointcut

Returns:

a distinct Pointcut that matches all methods that both of the given Pointcuts match
intersection
(Pointcut
the first Pointcut
pc1
,
Pointcut
the second Pointcut
pc2
)

Match all methods that both the given pointcuts match.

public static boolean

Returns:

whether there's a runtime match
matches
(Pointcut
the pointcut to match
pointcut
,
Method
the candidate method
method
,
Class<?>
the target class
targetClass
,
Object...
arguments to the method
args
)

Perform the least expensive check for a pointcut match.

public static Pointcut

Returns:

a distinct Pointcut that matches all methods that either of the given Pointcuts matches
union
(Pointcut
the first Pointcut
pc1
,
Pointcut
the second Pointcut
pc2
)

Match all methods that either (or both) of the given pointcuts matches.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

GETTERSback to summary
public static final Pointcut GETTERS

Pointcut matching all bean property getters, in any class.

SETTERSback to summary
public static final Pointcut SETTERS

Pointcut matching all bean property setters, in any class.

Constructor Detail

Pointcutsback to summary
public Pointcuts()

Method Detail

intersectionback to summary
public static Pointcut intersection(Pointcut pc1, Pointcut pc2)

Match all methods that both the given pointcuts match.

Parameters
pc1:Pointcut

the first Pointcut

pc2:Pointcut

the second Pointcut

Returns:Pointcut

a distinct Pointcut that matches all methods that both of the given Pointcuts match

matchesback to summary
public static boolean matches(Pointcut pointcut, Method method, Class<?> targetClass, Object... args)

Perform the least expensive check for a pointcut match.

Parameters
pointcut:Pointcut

the pointcut to match

method:Method

the candidate method

targetClass:Class<?>

the target class

args:Object[]

arguments to the method

Returns:boolean

whether there's a runtime match

unionback to summary
public static Pointcut union(Pointcut pc1, Pointcut pc2)

Match all methods that either (or both) of the given pointcuts matches.

Parameters
pc1:Pointcut

the first Pointcut

pc2:Pointcut

the second Pointcut

Returns:Pointcut

a distinct Pointcut that matches all methods that either of the given Pointcuts matches

org.springframework.aop.support back to summary

private Class Pointcuts.GetterPointcut

extends StaticMethodMatcherPointcut
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@SuppressWarnings:serial

Pointcut implementation that matches bean property getters.

Field Summary

Modifier and TypeField and Description
public static final Pointcuts.GetterPointcut

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
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.
private Object
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.springframework.aop.support.StaticMethodMatcherPointcut:
getClassFiltergetMethodMatchersetClassFilter

Field Detail

INSTANCEback to summary
public static final Pointcuts.GetterPointcut INSTANCE

Constructor Detail

GetterPointcutback to summary
private GetterPointcut()

Method Detail

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
readResolveback to summary
private Object readResolve()
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
org.springframework.aop.support back to summary

private Class Pointcuts.SetterPointcut

extends StaticMethodMatcherPointcut
implements Serializable
Class Inheritance
All Implemented Interfaces
java.io.Serializable
Annotations
@SuppressWarnings:serial

Pointcut implementation that matches bean property setters.

Field Summary

Modifier and TypeField and Description
public static final Pointcuts.SetterPointcut

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
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.
private Object
public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.
Inherited from org.springframework.aop.support.StaticMethodMatcherPointcut:
getClassFiltergetMethodMatchersetClassFilter

Field Detail

INSTANCEback to summary
public static final Pointcuts.SetterPointcut INSTANCE

Constructor Detail

SetterPointcutback to summary
private SetterPointcut()

Method Detail

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
readResolveback to summary
private Object readResolve()
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