Package org.springframework.aop.support
Class RegexpMethodPointcutAdvisor
java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.aop.support.AbstractGenericPointcutAdvisor
org.springframework.aop.support.RegexpMethodPointcutAdvisor
- All Implemented Interfaces:
- Serializable,- Advisor,- PointcutAdvisor,- Ordered
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.
 By default, JdkRegexpMethodPointcut will be used. To choose
 a specific one, override the createPointcut() method.
- Author:
- Rod Johnson, Juergen Hoeller
- See Also:
- 
Field SummaryFields inherited from interface org.springframework.aop.AdvisorEMPTY_ADVICEFields inherited from interface org.springframework.core.OrderedHIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
- 
Constructor SummaryConstructorsConstructorDescriptionCreate an empty RegexpMethodPointcutAdvisor.RegexpMethodPointcutAdvisor(String[] patterns, Advice advice) Create a RegexpMethodPointcutAdvisor for the given advice.RegexpMethodPointcutAdvisor(String pattern, Advice advice) Create a RegexpMethodPointcutAdvisor for the given advice.RegexpMethodPointcutAdvisor(Advice advice) Create a RegexpMethodPointcutAdvisor for the given advice.
- 
Method SummaryModifier and TypeMethodDescriptionprotected AbstractRegexpMethodPointcutCreate the actual pointcut: By default, aJdkRegexpMethodPointcutwill be used.Initialize the singleton Pointcut held within this Advisor.voidsetPattern(String pattern) Set the regular expression defining methods to match.voidsetPatterns(String... patterns) Set the regular expressions defining methods to match.toString()Methods inherited from class org.springframework.aop.support.AbstractGenericPointcutAdvisorgetAdvice, setAdviceMethods inherited from class org.springframework.aop.support.AbstractPointcutAdvisorequals, getOrder, hashCode, setOrderMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.springframework.aop.AdvisorisPerInstance
- 
Constructor Details- 
RegexpMethodPointcutAdvisorpublic RegexpMethodPointcutAdvisor()Create an empty RegexpMethodPointcutAdvisor.
- 
RegexpMethodPointcutAdvisorCreate a RegexpMethodPointcutAdvisor for the given advice. The pattern still needs to be specified afterwards.- Parameters:
- advice- the advice to use
- See Also:
 
- 
RegexpMethodPointcutAdvisorCreate a RegexpMethodPointcutAdvisor for the given advice.- Parameters:
- pattern- the pattern to use
- advice- the advice to use
 
- 
RegexpMethodPointcutAdvisorCreate a RegexpMethodPointcutAdvisor for the given advice.- Parameters:
- patterns- the patterns to use
- advice- the advice to use
 
 
- 
- 
Method Details- 
setPatternSet the regular expression defining methods to match.Use either this method or setPatterns(java.lang.String...), not both.- See Also:
 
- 
setPatternsSet 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. 
- 
getPointcutInitialize the singleton Pointcut held within this Advisor.
- 
createPointcutCreate the actual pointcut: By default, aJdkRegexpMethodPointcutwill be used.- Returns:
- the Pointcut instance (never null)
 
- 
toString- Overrides:
- toStringin class- AbstractGenericPointcutAdvisor
 
 
-