Each configured method name can be an exact method name or a method name
pattern (see isMatch(String, String) for details on the supported
pattern styles).
Does not handle overloaded methods: all methods with a given name will be eligible.
isMatch, JdkRegexpMethodPointcut
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public NameMatchMethodPointcut | Returns: this pointcut to allow for method chainingthe additional method name pattern mappedNamePattern)Add another method name pattern, in addition to those already configured. |
| public boolean | equals(Object
the reference object with which to compare. other)Overrides java. |
| public int | |
| protected boolean | |
| public boolean | matches(Method
the candidate method method, Class<?> the target class targetClass)Implements org. |
| public void | setMappedName(String mappedNamePattern)
Convenience method for configuring a single method name pattern. |
| public void | |
| public String |
| mappedNamePatterns | back to summary |
|---|---|
| private List<String> mappedNamePatterns | |
| NameMatchMethodPointcut | back to summary |
|---|---|
| public NameMatchMethodPointcut() | |
| addMethodName | back to summary |
|---|---|
| public NameMatchMethodPointcut addMethodName(String mappedNamePattern) Add another method name pattern, in addition to those already configured. Like the "set" methods, this method is for use when configuring proxies, before a proxy is used. Note This method does not work after the proxy is in use, since advice chains will be cached.
| |
| 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. | |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides java. Doc from java. Returns a hash code value for the object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isMatch | back to summary |
|---|---|
| protected boolean isMatch(String methodName, String mappedNamePattern) Determine if the given method name matches the mapped name pattern. The default implementation checks for Can be overridden in subclasses.
| |
| matches | back to summary |
|---|---|
| public boolean matches(Method method, Class<?> targetClass) Implements org. Doc from org. Perform static checking to determine whether the given method matches. If this method returns | |
| setMappedName | back to summary |
|---|---|
| public void setMappedName(String mappedNamePattern) Convenience method for configuring a single method name pattern. Use either this method or
| |
| setMappedNames | back to summary |
|---|---|
| public void setMappedNames(String... mappedNamePatterns) Set the method name patterns 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. | |