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(String[] patterns,
Advice advice)
Create a RegexpMethodPointcutAdvisor for the given advice.
|
RegexpMethodPointcutAdvisor(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(String pattern)
Set the regular expression defining methods to match.
|
void |
setPatterns(String[] patterns)
Set the regular expressions defining methods to match.
|
String |
toString() |
getAdvice, setAdviceequals, getOrder, hashCode, isPerInstance, setOrderpublic RegexpMethodPointcutAdvisor()
public RegexpMethodPointcutAdvisor(Advice advice)
advice - the advice to usesetPattern(java.lang.String),
setPatterns(java.lang.String[])public RegexpMethodPointcutAdvisor(String pattern, Advice advice)
pattern - the pattern to useadvice - the advice to usepublic void setPattern(String pattern)
Use either this method or setPatterns(java.lang.String[]), not both.
setPatterns(java.lang.String[])public void setPatterns(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 String toString()
toString in class AbstractGenericPointcutAdvisor