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
public class NameMatchMethodPointcutAdvisor extends AbstractGenericPointcutAdvisor
Convenient class for name-match method pointcuts that hold an Advice, making them an Advisor.- Author:
- Juergen Hoeller, Rob Harrop
- See Also:
NameMatchMethodPointcut
, Serialized Form
Field Summary
Fields inherited from interface org.springframework.core.Ordered
HIGHEST_PRECEDENCE, LOWEST_PRECEDENCE
Constructor Summary
Constructors Constructor Description NameMatchMethodPointcutAdvisor()
NameMatchMethodPointcutAdvisor(Advice advice)
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NameMatchMethodPointcut
addMethodName(String name)
Add another eligible method name, in addition to those already named.Pointcut
getPointcut()
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, isPerInstance, setOrder
Constructor Detail
NameMatchMethodPointcutAdvisor
public NameMatchMethodPointcutAdvisor()
NameMatchMethodPointcutAdvisor
public NameMatchMethodPointcutAdvisor(Advice advice)
Method Detail
setClassFilter
public void setClassFilter(ClassFilter classFilter)
Set theClassFilter
to use for this pointcut. Default isClassFilter.TRUE
.
setMappedName
public void setMappedName(String mappedName)
Convenience method when we have only a single method name to match. Use either this method orsetMappedNames
, not both.
setMappedNames
public void setMappedNames(String... mappedNames)
Set the method names defining methods to match. Matching will be the union of all these; if any match, the pointcut matches.
addMethodName
public NameMatchMethodPointcut addMethodName(String name)
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
- name of the additional method that will match- Returns:
- this pointcut to allow for multiple additions in one line
- See Also:
NameMatchMethodPointcut.addMethodName(java.lang.String)
getPointcut
public Pointcut getPointcut()
Description copied from interface:PointcutAdvisor
Get the Pointcut that drives this advisor.