public class

JdkRegexpMethodPointcut

extends AbstractRegexpMethodPointcut
java.lang.Object
   ↳ org.springframework.aop.support.StaticMethodMatcher
     ↳ org.springframework.aop.support.StaticMethodMatcherPointcut
       ↳ org.springframework.aop.support.AbstractRegexpMethodPointcut
         ↳ org.springframework.aop.support.JdkRegexpMethodPointcut

Class Overview

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.

Summary

[Expand]
Inherited Fields
From interface org.springframework.aop.MethodMatcher
From interface org.springframework.aop.Pointcut
Public Constructors
JdkRegexpMethodPointcut()
Protected Methods
void initExcludedPatternRepresentation(String[] excludedPatterns)
Initialize exclusion Pattern Patterns from the supplied String[].
void initPatternRepresentation(String[] patterns)
Initialize Pattern Patterns from the supplied String[].
boolean matches(String pattern, int patternIndex)
Returns true if the Pattern at index patternIndex matches the supplied candidate String.
boolean matchesExclusion(String candidate, int patternIndex)
Returns true if the exclusion Pattern at index patternIndex matches the supplied candidate String.
[Expand]
Inherited Methods
From class org.springframework.aop.support.AbstractRegexpMethodPointcut
From class org.springframework.aop.support.StaticMethodMatcherPointcut
From class org.springframework.aop.support.StaticMethodMatcher
From class java.lang.Object
From interface org.springframework.aop.MethodMatcher
From interface org.springframework.aop.Pointcut

Public Constructors

public JdkRegexpMethodPointcut ()

Protected Methods

protected void initExcludedPatternRepresentation (String[] excludedPatterns)

Initialize exclusion Pattern Patterns from the supplied String[].

Parameters
excludedPatterns the patterns to initialize

protected void initPatternRepresentation (String[] patterns)

Initialize Pattern Patterns from the supplied String[].

Parameters
patterns the patterns to initialize

protected boolean matches (String pattern, int patternIndex)

Returns true if the Pattern at index patternIndex matches the supplied candidate String.

Parameters
pattern String pattern to match
patternIndex index of pattern from 0
Returns
  • true if there is a match, else false.

protected boolean matchesExclusion (String candidate, int patternIndex)

Returns true if the exclusion Pattern at index patternIndex matches the supplied candidate String.

Parameters
candidate String pattern to match.
patternIndex index of pattern starting from 0.
Returns
  • true if there is a match, else false.