org.springframework.aop.support
Class Perl5RegexpMethodPointcut
java.lang.Object
org.springframework.aop.support.StaticMethodMatcher
org.springframework.aop.support.StaticMethodMatcherPointcut
org.springframework.aop.support.AbstractRegexpMethodPointcut
org.springframework.aop.support.Perl5RegexpMethodPointcut
- All Implemented Interfaces:
- Serializable, MethodMatcher, Pointcut
public class Perl5RegexpMethodPointcut
- extends AbstractRegexpMethodPointcut
Perl5-style regular expression pointcut. JavaBean properties are:
- pattern: Perl5 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.
Currently uses the Jakarta ORO
regular expression library. Does not require JDK 1.4+, in contrast to
JdkRegexpMethodPointcut.
- Since:
- 1.1
- Author:
- Rod Johnson, Rob Harrop
- See Also:
JdkRegexpMethodPointcut,
Serialized Form
| Fields inherited from interface org.springframework.aop.Pointcut |
TRUE |
|
Method Summary |
protected void |
initExcludedPatternRepresentation(String[] excludedPatterns)
Initializes the ORO representation of the supplied exclusion patterns. |
protected void |
initPatternRepresentation(String[] patterns)
Initializes the ORO representation of the supplied exclusion patterns. |
protected boolean |
matches(String pattern,
int patternIndex)
Returns true if the Pattern at index patternIndex
matches the supplied candidate String. |
protected boolean |
matchesExclusion(String pattern,
int patternIndex)
Returns true if the exclusion Pattern at index patternIndex
matches the supplied candidate String. |
Perl5RegexpMethodPointcut
public Perl5RegexpMethodPointcut()
initPatternRepresentation
protected void initPatternRepresentation(String[] patterns)
throws IllegalArgumentException
- Initializes the
ORO representation of the supplied exclusion patterns.
- Specified by:
initPatternRepresentation in class AbstractRegexpMethodPointcut
- Parameters:
patterns - the patterns to initialize
- Throws:
IllegalArgumentException - in case of an invalid pattern
matches
protected boolean matches(String pattern,
int patternIndex)
- Returns
true if the Pattern at index patternIndex
matches the supplied candidate String.
- Specified by:
matches in class AbstractRegexpMethodPointcut
- Parameters:
pattern - String pattern to matchpatternIndex - index of pattern from 0
- Returns:
true if there is a match, else false.
initExcludedPatternRepresentation
protected void initExcludedPatternRepresentation(String[] excludedPatterns)
throws IllegalArgumentException
- Initializes the
ORO representation of the supplied exclusion patterns.
- Specified by:
initExcludedPatternRepresentation in class AbstractRegexpMethodPointcut
- Throws:
IllegalArgumentException
matchesExclusion
protected boolean matchesExclusion(String pattern,
int patternIndex)
- Returns
true if the exclusion Pattern at index patternIndex
matches the supplied candidate String.
- Specified by:
matchesExclusion in class AbstractRegexpMethodPointcut
- Parameters:
pattern - String pattern to match.patternIndex - index of pattern starting from 0.
- Returns:
true if there is a match, else false.
Copyright © 2002-2007 The Spring Framework.