Save This Page
Home » spring-framework-2.5.5-with-dependencies » org.springframework » aop » support » [javadoc | source]
org.springframework.aop.support
public class: NameMatchMethodPointcut [javadoc | source]
java.lang.Object
   org.springframework.aop.support.StaticMethodMatcher
      org.springframework.aop.support.StaticMethodMatcherPointcut
         org.springframework.aop.support.NameMatchMethodPointcut

All Implemented Interfaces:
    Serializable, Pointcut, MethodMatcher

Pointcut bean for simple method name matches, as alternative to regexp patterns. Does not handle overloaded methods: all methods *with a given name will be eligible.
Method from org.springframework.aop.support.NameMatchMethodPointcut Summary:
addMethodName,   equals,   hashCode,   isMatch,   matches,   setMappedName,   setMappedNames
Methods from org.springframework.aop.support.StaticMethodMatcherPointcut:
getClassFilter,   getMethodMatcher,   setClassFilter
Methods from org.springframework.aop.support.StaticMethodMatcher:
isRuntime,   matches
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.springframework.aop.support.NameMatchMethodPointcut Detail:
 public NameMatchMethodPointcut addMethodName(String name) 
    Add another eligible method name, in addition to those already named. Like the set methods, this method is for use when configuring proxies, before a proxy is used.

    NB: This method does not work after the proxy is in use, as advice chains will be cached.

 public boolean equals(Object other) 
 public int hashCode() 
 protected boolean isMatch(String methodName,
    String mappedName) 
    Return if the given method name matches the mapped name.

    The default implementation checks for "xxx*", "*xxx" and "*xxx*" matches, as well as direct equality. Can be overridden in subclasses.

 public boolean matches(Method method,
    Class targetClass) 
 public  void setMappedName(String mappedName) 
    Convenience method when we have only a single method name to match. Use either this method or setMappedNames, not both.
 public  void setMappedNames(String[] mappedNames) 
    Set the method names defining methods to match. Matching will be the union of all these; if any match, the pointcut matches.