|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.support.AbstractPointcutAdvisor org.springframework.aop.support.RegexpMethodPointcutAdvisor
public class RegexpMethodPointcutAdvisor
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,
like Perl5RegexpMethodPointcut or JdkRegexpMethodPointcut.
To choose a specific one, either override createPointcut
or set the "perl5" flag accordingly.
By default, JdkRegexpMethodPointcut will be used on JDK 1.4+, falling back to Perl5RegexpMethodPointcut on JDK 1.3 (requiring Jakarta ORO on the classpath). The use of Perl5RegexpMethodPointcut can be enforced through specifying the "perl5" property.
setPattern(java.lang.String)
,
setPatterns(java.lang.String[])
,
setPerl5(boolean)
,
createPointcut()
,
AbstractRegexpMethodPointcut
,
Perl5RegexpMethodPointcut
,
JdkRegexpMethodPointcut
,
Serialized FormField Summary | |
---|---|
protected org.apache.commons.logging.Log |
logger
|
Constructor Summary | |
---|---|
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. |
Method Summary | |
---|---|
protected AbstractRegexpMethodPointcut |
createPointcut()
Create the actual pointcut: by default, a Perl5RegexpMethodPointcut will be created if Perl5 syntax is enforced or when running on JDK 1.3. |
Pointcut |
getPointcut()
Initialize the singleton pointcut held within this advisor. |
void |
setPattern(String pattern)
Convenience method when we have only a single pattern. |
void |
setPatterns(String[] patterns)
Set the regular expressions defining methods to match. |
void |
setPerl5(boolean perl5)
Set whether to enforce Perl5 regexp syntax. |
Methods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor |
---|
equals, getAdvice, getOrder, hashCode, isPerInstance, setAdvice, setOrder, toString |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected transient org.apache.commons.logging.Log logger
Constructor Detail |
---|
public RegexpMethodPointcutAdvisor()
setPattern(java.lang.String)
,
setPatterns(java.lang.String[])
,
setPerl5(boolean)
,
AbstractPointcutAdvisor.setAdvice(org.aopalliance.aop.Advice)
public RegexpMethodPointcutAdvisor(Advice advice)
advice
- the advice to usesetPattern(java.lang.String)
,
setPatterns(java.lang.String[])
,
setPerl5(boolean)
public RegexpMethodPointcutAdvisor(String pattern, Advice advice)
pattern
- the pattern to useadvice
- the advice to usesetPerl5(boolean)
public RegexpMethodPointcutAdvisor(String[] patterns, Advice advice)
patterns
- the patterns to useadvice
- the advice to usesetPerl5(boolean)
Method Detail |
---|
public void setPattern(String pattern)
To be passed through to the pointcut implementation.
setPatterns(java.lang.String[])
public void setPatterns(String[] patterns)
To be passed through to the pointcut implementation.
patterns
- regular expressions describing methods to matchpublic void setPerl5(boolean perl5)
Alternatively, override the createPointcut
method.
createPointcut()
,
Perl5RegexpMethodPointcut
,
JdkRegexpMethodPointcut
public Pointcut getPointcut()
protected AbstractRegexpMethodPointcut createPointcut()
setPerl5(boolean)
,
Perl5RegexpMethodPointcut
,
JdkRegexpMethodPointcut
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |