| java.lang.Object org.springframework.aop.support.StaticMethodMatcher org.springframework.aop.support.StaticMethodMatcherPointcut org.springframework.aop.support.AbstractRegexpMethodPointcut
All known Subclasses: org.springframework.aop.support.JdkRegexpMethodPointcut, org.springframework.aop.support.Perl5RegexpMethodPointcut,
AbstractRegexpMethodPointcut | abstract public class AbstractRegexpMethodPointcut extends StaticMethodMatcherPointcut implements Serializable(Code) | | Abstract base regular expression pointcut bean. JavaBean properties are:
- pattern: regular expression for the fully-qualified method names to match.
The exact regexp syntax will depend on the subclass (e.g. Perl5 regular expressions)
- 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.
This base class is serializable. Subclasses should declare all fields transient
- the initPatternRepresentation method in this class will be invoked again on the
client side on deserialization.
author: Rod Johnson author: Juergen Hoeller author: Rob Harrop since: 1.1 See Also: Perl5RegexpMethodPointcut See Also: JdkRegexpMethodPointcut |
Method Summary | |
public boolean | equals(Object other) | public String[] | getExcludedPatterns() Returns the regular expressions for exclusion matching. | public String[] | getPatterns() Return the regular expressions for method matching. | public int | hashCode() | abstract protected void | initExcludedPatternRepresentation(String[] excludedPatterns) | abstract protected void | initPatternRepresentation(String[] patterns) Subclasses must implement this to initialize regexp pointcuts. | final public boolean | matches(Method method, Class targetClass) Try to match the regular expression against the fully qualified name
of the method's declaring class, plus the name of the method. | abstract protected boolean | matches(String pattern, int patternIndex) | abstract protected boolean | matchesExclusion(String pattern, int patternIndex) Does the exclusion pattern at the given index match this string?
Parameters: pattern - String pattern to match. Parameters: patternIndex - index of pattern starting from 0. | public void | setExcludedPattern(String excludedPattern) Convenience method when we have only a single exclusion pattern. | public void | setExcludedPatterns(String[] excludedPatterns) Set the regular expressions defining methods to match for exclusion. | public void | setPattern(String pattern) Convenience method when we have only a single pattern. | public void | setPatterns(String[] patterns) Set the regular expressions defining methods to match. | public String | toString() |
getExcludedPatterns | public String[] getExcludedPatterns()(Code) | | Returns the regular expressions for exclusion matching.
|
getPatterns | public String[] getPatterns()(Code) | | Return the regular expressions for method matching.
|
hashCode | public int hashCode()(Code) | | |
initPatternRepresentation | abstract protected void initPatternRepresentation(String[] patterns) throws IllegalArgumentException(Code) | | Subclasses must implement this to initialize regexp pointcuts.
Can be invoked multiple times.
This method will be invoked from the setPatterns method,
and also on deserialization.
Parameters: patterns - the patterns to initialize throws: IllegalArgumentException - in case of an invalid pattern |
matches | final public boolean matches(Method method, Class targetClass)(Code) | | Try to match the regular expression against the fully qualified name
of the method's declaring class, plus the name of the method.
Note that the declaring class is that class that originally declared
the method, not necessarily the class that's currently exposing it.
For example, "java.lang.Object.hashCode" matches any subclass
of Object's hashCode() method.
|
matches | abstract protected boolean matches(String pattern, int patternIndex)(Code) | | Does the pattern at the given index match this string?
Parameters: pattern - String pattern to match Parameters: patternIndex - index of pattern from 0 true if there is a match, else false . |
matchesExclusion | abstract protected boolean matchesExclusion(String pattern, int patternIndex)(Code) | | Does the exclusion pattern at the given index match this string?
Parameters: pattern - String pattern to match. Parameters: patternIndex - index of pattern starting from 0. true if there is a match, else false . |
setExcludedPatterns | public void setExcludedPatterns(String[] excludedPatterns)(Code) | | Set the regular expressions defining methods to match for exclusion.
Matching will be the union of all these; if any match,
the pointcut matches.
|
setPatterns | public void setPatterns(String[] patterns)(Code) | | Set the regular expressions defining methods to match.
Matching will be the union of all these; if any match,
the pointcut matches.
|
|
|