public abstract class

Pointcuts

extends Object
java.lang.Object
   ↳ org.springframework.aop.support.Pointcuts

Class Overview

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.

Summary

Fields
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
Public Constructors
Pointcuts()
Public Methods
static Pointcut intersection(Pointcut pc1, Pointcut pc2)
Match all methods that both the given pointcuts match.
static boolean matches(Pointcut pointcut, Method method, Class targetClass, Object[] args)
Perform the least expensive check for a pointcut match.
static Pointcut union(Pointcut pc1, Pointcut pc2)
Match all methods that either (or both) of the given pointcuts matches.
[Expand]
Inherited Methods
From class java.lang.Object

Fields

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

Public Constructors

public Pointcuts ()

Public Methods

public static Pointcut intersection (Pointcut pc1, Pointcut pc2)

Match all methods that both the given pointcuts match.

Parameters
pc1 the first Pointcut
pc2 the second Pointcut
Returns
  • a distinct Pointcut that matches all methods that both of the given Pointcuts match

public static boolean matches (Pointcut pointcut, Method method, Class targetClass, Object[] args)

Perform the least expensive check for a pointcut match.

Parameters
pointcut the pointcut to match
method the candidate method
targetClass the target class
args arguments to the method
Returns
  • whether there's a runtime match

public static Pointcut union (Pointcut pc1, Pointcut pc2)

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

Parameters
pc1 the first Pointcut
pc2 the second Pointcut
Returns
  • a distinct Pointcut that matches all methods that either of the given Pointcuts matches