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

JdkRegexpMethodPointcut

open class JdkRegexpMethodPointcut : AbstractRegexpMethodPointcut

Regular expression pointcut based on the java.util.regex package. Supports the following JavaBean properties:

Note: the regular expressions must be a match. For example, .*get.* will match com.mycom.Foo.getBar(). get.* will not.

Author
Dmitriy Kopylenko

Author
Rob Harrop

Since
1.1

Constructors

<init>

JdkRegexpMethodPointcut()

Regular expression pointcut based on the java.util.regex package. Supports the following JavaBean properties:

  • pattern: regular expression for the fully-qualified method names to match
  • patterns: alternative property taking a String array of patterns. The result will be the union of these patterns.

Note: the regular expressions must be a match. For example, .*get.* will match com.mycom.Foo.getBar(). get.* will not.

Inherited Functions

equals

open fun equals(other: Any?): Boolean

getExcludedPatterns

open fun getExcludedPatterns(): Array<String>

Returns the regular expressions for exclusion matching.

getPatterns

open fun getPatterns(): Array<String>

Return the regular expressions for method matching.

hashCode

open fun hashCode(): Int

matches

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

Try to match the regular expression against the fully qualified name of the target class as well as against the method's declaring class, plus the name of the method.

setExcludedPattern

open fun setExcludedPattern(excludedPattern: String): Unit

Convenience method when we have only a single exclusion pattern. Use either this method or #setExcludedPatterns, not both.

setExcludedPatterns

open fun setExcludedPatterns(vararg excludedPatterns: String): Unit

Set the regular expressions defining methods to match for exclusion. Matching will be the union of all these; if any match, the pointcut matches.

setPattern

open fun setPattern(pattern: String): Unit

Convenience method when we have only a single pattern. Use either this method or #setPatterns, not both.

setPatterns

open fun setPatterns(vararg patterns: String): Unit

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

toString

open fun toString(): String