Package org.springframework.aop.support
Class NameMatchMethodPointcutAdvisor
java.lang.Object
org.springframework.aop.support.AbstractPointcutAdvisor
org.springframework.aop.support.AbstractGenericPointcutAdvisor
org.springframework.aop.support.NameMatchMethodPointcutAdvisor
- All Implemented Interfaces:
Serializable
,Advisor
,PointcutAdvisor
,Ordered
Convenient class for name-match method pointcuts that hold an Advice,
making them an Advisor.
- Author:
- Juergen Hoeller, Rob Harrop
- See Also:
-
Field Summary
Fields inherited from interface org.springframework.aop.Advisor
EMPTY_ADVICE
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionaddMethodName
(String name) Add another eligible method name, in addition to those already named.Get the Pointcut that drives this advisor.void
setClassFilter
(ClassFilter classFilter) Set theClassFilter
to use for this pointcut.void
setMappedName
(String mappedName) Convenience method when we have only a single method name to match.void
setMappedNames
(String... mappedNames) Set the method names defining methods to match.Methods inherited from class org.springframework.aop.support.AbstractGenericPointcutAdvisor
getAdvice, setAdvice, toString
Methods inherited from class org.springframework.aop.support.AbstractPointcutAdvisor
equals, getOrder, hashCode, setOrder
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface org.springframework.aop.Advisor
isPerInstance
-
Constructor Details
-
NameMatchMethodPointcutAdvisor
public NameMatchMethodPointcutAdvisor() -
NameMatchMethodPointcutAdvisor
-
-
Method Details
-
setClassFilter
Set theClassFilter
to use for this pointcut. Default isClassFilter.TRUE
. -
setMappedName
Convenience method when we have only a single method name to match. Use either this method orsetMappedNames
, not both. -
setMappedNames
Set the method names defining methods to match. Matching will be the union of all these; if any match, the pointcut matches. -
addMethodName
Add another eligible method name, in addition to those already named. Like the set methods, this method is for use when configuring proxies, before a proxy is used.- Parameters:
name
- the name of the additional method that will match- Returns:
- this pointcut to allow for multiple additions in one line
- See Also:
-
getPointcut
Description copied from interface:PointcutAdvisor
Get the Pointcut that drives this advisor.
-