public class

RegexpMethodPointcutAdvisor

extends AbstractGenericPointcutAdvisor
java.lang.Object
   ↳ org.springframework.aop.support.AbstractPointcutAdvisor
     ↳ org.springframework.aop.support.AbstractGenericPointcutAdvisor
       ↳ org.springframework.aop.support.RegexpMethodPointcutAdvisor

Class Overview

Convenient class for regexp method pointcuts that hold an Advice, making them an Advisor.

Configure this class using the "pattern" and "patterns" pass-through properties. These are analogous to the pattern and patterns properties of AbstractRegexpMethodPointcut.

Can delegate to any AbstractRegexpMethodPointcut subclass. By default, JdkRegexpMethodPointcut will be used. To choose a specific one, override the createPointcut() method.

Summary

[Expand]
Inherited Constants
From interface org.springframework.core.Ordered
Public Constructors
RegexpMethodPointcutAdvisor()
Create an empty RegexpMethodPointcutAdvisor.
RegexpMethodPointcutAdvisor(Advice advice)
Create a RegexpMethodPointcutAdvisor for the given advice.
RegexpMethodPointcutAdvisor(String pattern, Advice advice)
Create a RegexpMethodPointcutAdvisor for the given advice.
RegexpMethodPointcutAdvisor(String[] patterns, Advice advice)
Create a RegexpMethodPointcutAdvisor for the given advice.
Public Methods
Pointcut getPointcut()
Initialize the singleton Pointcut held within this Advisor.
void setPattern(String pattern)
Set the regular expression defining methods to match.
void setPatterns(String[] patterns)
Set the regular expressions defining methods to match.
String toString()
Protected Methods
AbstractRegexpMethodPointcut createPointcut()
Create the actual pointcut: By default, a JdkRegexpMethodPointcut will be used.
[Expand]
Inherited Methods
From class org.springframework.aop.support.AbstractGenericPointcutAdvisor
From class org.springframework.aop.support.AbstractPointcutAdvisor
From class java.lang.Object
From interface org.springframework.aop.Advisor
From interface org.springframework.aop.PointcutAdvisor
From interface org.springframework.core.Ordered

Public Constructors

public RegexpMethodPointcutAdvisor ()

Create an empty RegexpMethodPointcutAdvisor.

public RegexpMethodPointcutAdvisor (Advice advice)

Create a RegexpMethodPointcutAdvisor for the given advice. The pattern still needs to be specified afterwards.

Parameters
advice the advice to use

public RegexpMethodPointcutAdvisor (String pattern, Advice advice)

Create a RegexpMethodPointcutAdvisor for the given advice.

Parameters
pattern the pattern to use
advice the advice to use

public RegexpMethodPointcutAdvisor (String[] patterns, Advice advice)

Create a RegexpMethodPointcutAdvisor for the given advice.

Parameters
patterns the patterns to use
advice the advice to use

Public Methods

public Pointcut getPointcut ()

Initialize the singleton Pointcut held within this Advisor.

public void setPattern (String pattern)

Set the regular expression defining methods to match.

Use either this method or setPatterns(String[]), not both.

public void setPatterns (String[] patterns)

Set the regular expressions defining methods to match. To be passed through to the pointcut implementation.

Matching will be the union of all these; if any of the patterns matches, the pointcut matches.

public String toString ()

Protected Methods

protected AbstractRegexpMethodPointcut createPointcut ()

Create the actual pointcut: By default, a JdkRegexpMethodPointcut will be used.

Returns
  • the Pointcut instance (never null)