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 will be invoked again on deserialization.
JdkRegexpMethodPointcut
| Modifier and Type | Field and Description |
|---|---|
| private String[] | excludedPatterns
Regular expressions not to match. |
| private String[] | patterns
Regular expressions to match. |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. Indicates whether some other object is "equal to" this one. |
| public String[] | |
| public String[] | |
| public int | |
| protected abstract void | initExcludedPatternRepresentation(String[]
the patterns to initialize patterns)Subclasses must implement this to initialize regexp pointcuts. |
| protected abstract void | initPatternRepresentation(String[]
the patterns to initialize patterns)Subclasses must implement this to initialize regexp pointcuts. |
| public boolean | matches(Method
the candidate method method, Class<?> the target class targetClass)Implements org. 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. |
| protected abstract boolean | |
| protected abstract boolean | Returns: true if there is a match, false otherwisethe pattern, int String pattern to matchindex of pattern (starting from 0) patternIndex)Does the exclusion pattern at the given index match the given String? |
| protected boolean | Returns: whether the candidate matches at least one of the specified patterns"java.lang.Object.hashCode" style signature signatureString)Match the specified candidate against the configured patterns. |
| 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 | |
| public void | |
| public String |
| excludedPatterns | back to summary |
|---|---|
| private String[] excludedPatterns Regular expressions not to match. | |
| patterns | back to summary |
|---|---|
| private String[] patterns Regular expressions to match. | |
| AbstractRegexpMethodPointcut | back to summary |
|---|---|
| public AbstractRegexpMethodPointcut() | |
| equals | back to summary |
|---|---|
| public boolean equals(Object other) Overrides java. Doc from java. Indicates whether some other object is "equal to" this one.
The
An equivalence relation partitions the elements it operates on into equivalence classes; all the members of an equivalence class are equal to each other. Members of an equivalence class are substitutable for each other, at least for some purposes. | |
| getExcludedPatterns | back to summary |
|---|---|
| public String[] getExcludedPatterns() Returns the regular expressions for exclusion matching. | |
| getPatterns | back to summary |
|---|---|
| public String[] getPatterns() Return the regular expressions for method matching. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| initExcludedPatternRepresentation | back to summary |
|---|---|
| protected abstract void initExcludedPatternRepresentation(String[] patterns) throws IllegalArgumentException Subclasses must implement this to initialize regexp pointcuts. Can be invoked multiple times. This method will be invoked from the
| |
| initPatternRepresentation | back to summary |
|---|---|
| protected abstract void initPatternRepresentation(String[] patterns) throws IllegalArgumentException Subclasses must implement this to initialize regexp pointcuts. Can be invoked multiple times. This method will be invoked from the
| |
| matches | back to summary |
|---|---|
| public boolean matches(Method method, Class<?> targetClass) Implements org. 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.
| |
| matches | back to summary |
|---|---|
| protected abstract boolean matches(String pattern, int patternIndex) Does the pattern at the given index match the given String?
| |
| matchesExclusion | back to summary |
|---|---|
| protected abstract boolean matchesExclusion(String pattern, int patternIndex) Does the exclusion pattern at the given index match the given String?
| |
| matchesPattern | back to summary |
|---|---|
| protected boolean matchesPattern(String signatureString) Match the specified candidate against the configured patterns.
| |
| setExcludedPattern | back to summary |
|---|---|
| public void setExcludedPattern(String excludedPattern) Convenience method when we have only a single exclusion pattern.
Use either this method or
| |
| setExcludedPatterns | back to summary |
|---|---|
| public void setExcludedPatterns(String... excludedPatterns) 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 | back to summary |
|---|---|
| public void setPattern(String pattern) Convenience method when we have only a single pattern.
Use either this method or
| |
| setPatterns | back to summary |
|---|---|
| public void setPatterns(String... patterns) Set the regular expressions defining methods to match. Matching will be the union of all these; if any match, the pointcut matches.
| |
| toString | back to summary |
|---|---|
| public String toString() Overrides java. Doc from java. Returns a string representation of the object.
Satisfying this method's contract implies a non- | |