| 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.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.
Perl5RegexpMethodPointcut, 
JdkRegexpMethodPointcut, 
Serialized Form| Field Summary | |
|---|---|
protected  Log | 
logger
Transient as it's reinitialized on deserialization  | 
| Fields inherited from interface org.springframework.aop.ClassFilter | 
|---|
TRUE | 
| Fields inherited from interface org.springframework.aop.Pointcut | 
|---|
TRUE | 
| Fields inherited from interface org.springframework.aop.MethodMatcher | 
|---|
TRUE | 
| Constructor Summary | |
|---|---|
AbstractRegexpMethodPointcut()
 | 
|
| Method Summary | |
|---|---|
 ClassFilter | 
getClassFilter()
Return the ClassFilter for this pointcut.  | 
 String[] | 
getPatterns()
Return the regular expressions for method matching.  | 
protected abstract  void | 
initPatternRepresentation(String[] patterns)
Subclasses must implement this to initialize regexp pointcuts.  | 
 boolean | 
matches(Class clazz)
Should the pointcut apply to the given interface or target class?  | 
 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.  | 
protected abstract  boolean | 
matches(String pattern,
        int patternIndex)
Does the pattern at the given index match this string?  | 
 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.  | 
| Methods inherited from class org.springframework.aop.support.StaticMethodMatcherPointcut | 
|---|
getMethodMatcher, setClassFilter | 
| Methods inherited from class org.springframework.aop.support.StaticMethodMatcher | 
|---|
isRuntime, matches | 
| Methods inherited from class java.lang.Object | 
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
|---|
protected transient Log logger
| Constructor Detail | 
|---|
public AbstractRegexpMethodPointcut()
| Method Detail | 
|---|
public void setPattern(String pattern)
setPatterns(java.lang.String[])public void setPatterns(String[] patterns)
patterns - regular expressions describing methods to matchpublic String[] getPatterns()
protected abstract void initPatternRepresentation(String[] patterns)
                                           throws IllegalArgumentException
This method will be invoked from the setPatterns method, and also on deserialization.
patterns - the patterns to initialize
IllegalArgumentException - in case of an invalid pattern
protected abstract boolean matches(String pattern,
                                   int patternIndex)
pattern - string pattern to matchpatternIndex - index of pattern from 0
public final boolean matches(Method method,
                             Class targetClass)
For example, "java.lang.Object.hashCode" matches any subclass
 of Object's hashCode() method.
matches in interface MethodMatchermethod - 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)
public boolean matches(Class clazz)
ClassFilter
matches in interface ClassFilterclazz - the candidate target class
public final ClassFilter getClassFilter()
Pointcut
getClassFilter in interface PointcutgetClassFilter in class StaticMethodMatcherPointcutnull)
  | 
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||