spring-framework / org.springframework.aop.support / RegexpMethodPointcutAdvisor

RegexpMethodPointcutAdvisor

open class RegexpMethodPointcutAdvisor : AbstractGenericPointcutAdvisor

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.

Author
Rod Johnson

Author
Juergen Hoeller

See Also
#setPattern#setPatternsJdkRegexpMethodPointcut

Constructors

<init>

RegexpMethodPointcutAdvisor()

Create an empty RegexpMethodPointcutAdvisor.

RegexpMethodPointcutAdvisor(advice: Advice)

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

RegexpMethodPointcutAdvisor(pattern: String, advice: Advice)
RegexpMethodPointcutAdvisor(patterns: Array<String>, advice: Advice)

Create a RegexpMethodPointcutAdvisor for the given advice.

Functions

getPointcut

open fun getPointcut(): Pointcut

Initialize the singleton Pointcut held within this Advisor.

setPattern

open fun setPattern(pattern: String): Unit

Set the regular expression defining methods to match.

Use either this method or #setPatterns, not both.

setPatterns

open fun setPatterns(vararg patterns: String): Unit

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.

toString

open fun toString(): String