|
||||||||||
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 the createPointcut()
method 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()
,
Perl5RegexpMethodPointcut
,
JdkRegexpMethodPointcut
,
Serialized FormField Summary | |
---|---|
protected 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)
Set the regular expression defining methods to match. |
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 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)
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.
AbstractRegexpMethodPointcut.setPatterns(java.lang.String[])
public void setPerl5(boolean perl5)
Turn this flag on to use Perl5RegexpMethodPointcut
(delegating to Jakarta ORO). Else, JdkRegexpMethodPointcut
will
be used on JDK 1.4+, falling back to Perl5RegexpMethodPointcut on JDK 1.3.
Alternatively, override the createPointcut()
method.
createPointcut()
,
Perl5RegexpMethodPointcut
,
JdkRegexpMethodPointcut
public Pointcut getPointcut()
protected AbstractRegexpMethodPointcut createPointcut()
Perl5RegexpMethodPointcut
will be created if Perl5 syntax is enforced or when running on JDK 1.3.
Else, a JdkRegexpMethodPointcut
(JDK 1.4+) will be used.
null
)setPerl5(boolean)
,
Perl5RegexpMethodPointcut
,
JdkRegexpMethodPointcut
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |