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

public Class RegexpMethodPointcutAdvisor

extends AbstractGenericPointcutAdvisor
Class Inheritance
Annotations
@SuppressWarnings:serial
Imports
java.io.Serializable, org.aopalliance.aop.Advice, org.springframework.aop.Pointcut, org.springframework.lang.Nullable, org.springframework.util.ObjectUtils

Convenient class for regexp method pointcuts that hold an Advice, making them an org.springframework.aop.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.

Authors
Rod Johnson, Juergen Hoeller
See Also
setPattern, setPatterns, JdkRegexpMethodPointcut

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
RegexpMethodPointcutAdvisor.SerializableMonitor

Empty class used for a serializable monitor object.

Field Summary

Modifier and TypeField and Description
private String[]
private AbstractRegexpMethodPointcut
private final Object

Constructor Summary

AccessConstructor and Description
public
RegexpMethodPointcutAdvisor()

Create an empty RegexpMethodPointcutAdvisor.

public
RegexpMethodPointcutAdvisor(Advice
the advice to use
advice
)

Create a RegexpMethodPointcutAdvisor for the given advice.

public
RegexpMethodPointcutAdvisor(String
the pattern to use
pattern
,
Advice
the advice to use
advice
)

Create a RegexpMethodPointcutAdvisor for the given advice.

public
RegexpMethodPointcutAdvisor(String[]
the patterns to use
patterns
,
Advice
the advice to use
advice
)

Create a RegexpMethodPointcutAdvisor for the given advice.

Method Summary

Modifier and TypeMethod and Description
protected AbstractRegexpMethodPointcut

Returns:

the Pointcut instance (never null)
createPointcut
()

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

public Pointcut
getPointcut()

Implements org.springframework.aop.PointcutAdvisor.getPointcut.

Initialize the singleton Pointcut held within this Advisor.
public void
setPattern(String pattern)

Set the regular expression defining methods to match.

public void
setPatterns(String... patterns)

Set the regular expressions defining methods to match.

public String
toString()

Overrides org.springframework.aop.support.AbstractGenericPointcutAdvisor.toString.

Returns a string representation of the object.
Inherited from org.springframework.aop.support.AbstractGenericPointcutAdvisor:
getAdvicesetAdvice

Field Detail

patternsback to summary
private String[] patterns
Annotations
@Nullable
pointcutback to summary
private AbstractRegexpMethodPointcut pointcut
Annotations
@Nullable
pointcutMonitorback to summary
private final Object pointcutMonitor

Constructor Detail

RegexpMethodPointcutAdvisorback to summary
public RegexpMethodPointcutAdvisor()

Create an empty RegexpMethodPointcutAdvisor.

See Also
setPattern, setPatterns, setAdvice
RegexpMethodPointcutAdvisorback to summary
public RegexpMethodPointcutAdvisor(Advice advice)

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

Parameters
advice:Advice

the advice to use

See Also
setPattern, setPatterns
RegexpMethodPointcutAdvisorback to summary
public RegexpMethodPointcutAdvisor(String pattern, Advice advice)

Create a RegexpMethodPointcutAdvisor for the given advice.

Parameters
pattern:String

the pattern to use

advice:Advice

the advice to use

RegexpMethodPointcutAdvisorback to summary
public RegexpMethodPointcutAdvisor(String[] patterns, Advice advice)

Create a RegexpMethodPointcutAdvisor for the given advice.

Parameters
patterns:String[]

the patterns to use

advice:Advice

the advice to use

Method Detail

createPointcutback to summary
protected AbstractRegexpMethodPointcut createPointcut()

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

Returns:AbstractRegexpMethodPointcut

the Pointcut instance (never null)

getPointcutback to summary
public Pointcut getPointcut()

Implements org.springframework.aop.PointcutAdvisor.getPointcut.

Initialize the singleton Pointcut held within this Advisor.

Annotations
@Override
setPatternback to summary
public void setPattern(String pattern)

Set the regular expression defining methods to match.

Use either this method or setPatterns, not both.

See Also
setPatterns
setPatternsback to summary
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.

See Also
AbstractRegexpMethodPointcut#setPatterns
toStringback to summary
public String toString()

Overrides org.springframework.aop.support.AbstractGenericPointcutAdvisor.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 RegexpMethodPointcutAdvisor.SerializableMonitor

extends Object
implements Serializable
Class Inheritance
  • java.lang.Object
  • org.springframework.aop.support.RegexpMethodPointcutAdvisor.SerializableMonitor
All Implemented Interfaces
java.io.Serializable

Empty class used for a serializable monitor object.

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

SerializableMonitorback to summary
private SerializableMonitor()