public class RegexpMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor
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.
setPattern(java.lang.String)
,
setPatterns(java.lang.String...)
,
JdkRegexpMethodPointcut
,
Serialized FormHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor and Description |
---|
RegexpMethodPointcutAdvisor()
Create an empty RegexpMethodPointcutAdvisor.
|
RegexpMethodPointcutAdvisor(Advice advice)
Create a RegexpMethodPointcutAdvisor for the given advice.
|
RegexpMethodPointcutAdvisor(java.lang.String[] patterns,
Advice advice)
Create a RegexpMethodPointcutAdvisor for the given advice.
|
RegexpMethodPointcutAdvisor(java.lang.String pattern,
Advice advice)
Create a RegexpMethodPointcutAdvisor for the given advice.
|
Modifier and Type | Method and Description |
---|---|
protected AbstractRegexpMethodPointcut |
createPointcut()
Create the actual pointcut: By default, a
JdkRegexpMethodPointcut
will be used. |
Pointcut |
getPointcut()
Initialize the singleton Pointcut held within this Advisor.
|
void |
setPattern(java.lang.String pattern)
Set the regular expression defining methods to match.
|
void |
setPatterns(java.lang.String... patterns)
Set the regular expressions defining methods to match.
|
java.lang.String |
toString() |
getAdvice, setAdvice
equals, getOrder, hashCode, isPerInstance, setOrder
public RegexpMethodPointcutAdvisor()
public RegexpMethodPointcutAdvisor(Advice advice)
advice
- the advice to usesetPattern(java.lang.String)
,
setPatterns(java.lang.String...)
public RegexpMethodPointcutAdvisor(java.lang.String pattern, Advice advice)
pattern
- the pattern to useadvice
- the advice to usepublic RegexpMethodPointcutAdvisor(java.lang.String[] patterns, Advice advice)
patterns
- the patterns to useadvice
- the advice to usepublic void setPattern(java.lang.String pattern)
Use either this method or setPatterns(java.lang.String...)
, not both.
setPatterns(java.lang.String...)
public void setPatterns(java.lang.String... patterns)
Matching will be the union of all these; if any of the patterns matches, the pointcut matches.
public Pointcut getPointcut()
protected AbstractRegexpMethodPointcut createPointcut()
JdkRegexpMethodPointcut
will be used.null
)public java.lang.String toString()
toString
in class AbstractGenericPointcutAdvisor