spring-framework / org.springframework.aop.support / NameMatchMethodPointcut

NameMatchMethodPointcut

open class NameMatchMethodPointcut : StaticMethodMatcherPointcut, Serializable

Pointcut bean for simple method name matches, as alternative to regexp patterns. Does not handle overloaded methods: all methods with a given name will be eligible.

Author
Juergen Hoeller

Author
Rod Johnson

Author
Rob Harrop

Since
11.02.2004

See Also
#isMatch

Constructors

<init>

NameMatchMethodPointcut()

Pointcut bean for simple method name matches, as alternative to regexp patterns. Does not handle overloaded methods: all methods with a given name will be eligible.

Functions

addMethodName

open fun addMethodName(name: String): NameMatchMethodPointcut

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.

NB: This method does not work after the proxy is in use, as advice chains will be cached.

equals

open fun equals(other: Any?): Boolean

hashCode

open fun hashCode(): Int

matches

open fun matches(method: Method, targetClass: Class<*>): Boolean

setMappedName

open fun setMappedName(mappedName: String): Unit

Convenience method when we have only a single method name to match. Use either this method or setMappedNames, not both.

setMappedNames

open fun setMappedNames(vararg mappedNames: String): Unit

Set the method names defining methods to match. Matching will be the union of all these; if any match, the pointcut matches.