org.springframework.aop.support
public class: JdkRegexpMethodPointcut [javadoc |
source]
java.lang.Object
org.springframework.aop.support.StaticMethodMatcher
org.springframework.aop.support.StaticMethodMatcherPointcut
org.springframework.aop.support.AbstractRegexpMethodPointcut
org.springframework.aop.support.JdkRegexpMethodPointcut
All Implemented Interfaces:
Serializable, Pointcut, MethodMatcher
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.
- author:
Dmitriy - Kopylenko
- author:
Rob - Harrop
- since:
1.1 -
| Methods from org.springframework.aop.support.AbstractRegexpMethodPointcut: |
|---|
|
equals, getExcludedPatterns, getPatterns, hashCode, initExcludedPatternRepresentation, initPatternRepresentation, matches, matches, matchesExclusion, matchesPattern, setExcludedPattern, setExcludedPatterns, setPattern, setPatterns, toString |
| Methods from org.springframework.aop.support.StaticMethodMatcher: |
|---|
|
isRuntime, matches |
| Method from org.springframework.aop.support.JdkRegexpMethodPointcut Detail: |
protected void initExcludedPatternRepresentation(String[] excludedPatterns) throws IllegalArgumentException {
this.compiledExclusionPatterns = compilePatterns(excludedPatterns);
}
Initialize exclusion Patterns from the supplied String[]. |
protected void initPatternRepresentation(String[] patterns) throws PatternSyntaxException {
this.compiledPatterns = compilePatterns(patterns);
}
Initialize Patterns from the supplied String[]. |
protected boolean matches(String pattern,
int patternIndex) {
Matcher matcher = this.compiledPatterns[patternIndex].matcher(pattern);
return matcher.matches();
}
Returns true if the Pattern at index patternIndex
matches the supplied candidate String. |
protected boolean matchesExclusion(String candidate,
int patternIndex) {
Matcher matcher = this.compiledExclusionPatterns[patternIndex].matcher(candidate);
return matcher.matches();
}
Returns true if the exclusion Pattern at index patternIndex
matches the supplied candidate String. |