|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.springframework.aop.support.StaticMethodMatcher org.springframework.aop.support.StaticMethodMatcherPointcut org.springframework.aop.support.AbstractRegexpMethodPointcut
public abstract class AbstractRegexpMethodPointcut
Abstract base regular expression pointcut bean. JavaBean properties are:
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.
JdkRegexpMethodPointcut
,
Serialized FormField Summary |
---|
Fields inherited from interface org.springframework.aop.Pointcut |
---|
TRUE |
Fields inherited from interface org.springframework.aop.MethodMatcher |
---|
TRUE |
Constructor Summary | |
---|---|
AbstractRegexpMethodPointcut()
|
Method Summary | |
---|---|
boolean |
equals(Object other)
|
String[] |
getExcludedPatterns()
Returns the regular expressions for exclusion matching. |
String[] |
getPatterns()
Return the regular expressions for method matching. |
int |
hashCode()
|
protected abstract void |
initExcludedPatternRepresentation(String[] patterns)
Subclasses must implement this to initialize regexp pointcuts. |
protected abstract void |
initPatternRepresentation(String[] patterns)
Subclasses must implement this to initialize regexp pointcuts. |
boolean |
matches(Method method,
Class targetClass)
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 |
matches(String pattern,
int patternIndex)
Does the pattern at the given index match this string? |
protected abstract boolean |
matchesExclusion(String pattern,
int patternIndex)
Does the exclusion pattern at the given index match this string? |
protected boolean |
matchesPattern(String signatureString)
Match the specified candidate against the configured patterns. |
void |
setExcludedPattern(String excludedPattern)
Convenience method when we have only a single exclusion pattern. |
void |
setExcludedPatterns(String[] excludedPatterns)
Set the regular expressions defining methods to match for exclusion. |
void |
setPattern(String pattern)
Convenience method when we have only a single pattern. |
void |
setPatterns(String[] patterns)
Set the regular expressions defining methods to match. |
String |
toString()
|
Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcut |
---|
getClassFilter, getMethodMatcher, setClassFilter |
Methods inherited from class org.springframework.aop.support.StaticMethodMatcher |
---|
isRuntime, matches |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public AbstractRegexpMethodPointcut()
Method Detail |
---|
public void setPattern(String pattern)
setPatterns(java.lang.String[])
, not both.
setPatterns(java.lang.String[])
public void setPatterns(String[] patterns)
public String[] getPatterns()
public void setExcludedPattern(String excludedPattern)
setExcludedPatterns(java.lang.String[])
, not both.
setExcludedPatterns(java.lang.String[])
public void setExcludedPatterns(String[] excludedPatterns)
public String[] getExcludedPatterns()
public boolean matches(Method method, Class targetClass)
matches
in interface MethodMatcher
method
- the candidate methodtargetClass
- the target class (may be null
, in which case
the candidate class must be taken to be the method's declaring class)
protected boolean matchesPattern(String signatureString)
signatureString
- "java.lang.Object.hashCode" style signature
protected abstract void initPatternRepresentation(String[] patterns) throws IllegalArgumentException
This method will be invoked from the setPatterns(java.lang.String[])
method,
and also on deserialization.
patterns
- the patterns to initialize
IllegalArgumentException
- in case of an invalid patternprotected abstract void initExcludedPatternRepresentation(String[] patterns) throws IllegalArgumentException
This method will be invoked from the setExcludedPatterns(java.lang.String[])
method,
and also on deserialization.
patterns
- the patterns to initialize
IllegalArgumentException
- in case of an invalid patternprotected abstract boolean matches(String pattern, int patternIndex)
pattern
- String
pattern to matchpatternIndex
- index of pattern from 0
true
if there is a match, else false
.protected abstract boolean matchesExclusion(String pattern, int patternIndex)
pattern
- String
pattern to match.patternIndex
- index of pattern starting from 0.
true
if there is a match, else false
.public boolean equals(Object other)
equals
in class Object
public int hashCode()
hashCode
in class Object
public String toString()
toString
in class Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |