A utility class used for matching a {@link org.apache.hivemind.service.MethodSignature} against amethod pattern (this is primarily used by {@link org.apache.hivemind.ServiceInterceptorFactory interceptor factories}). A method pattern consists of a
name pattern and an optional
parameters pattern.
The name pattern matches against the method name, and can be one of the following:
- A single name - which requires an exact match. Example:
perform
- A name suffix, indicated with a leading '*'. Example:
*form
- A name prefix, indicated with a trailing '*'. Example:
per*
- A name substring, indicated with leading and trailing '*'s. Example:
*erfo*
. - A match any, indicated with a single '*'. Example:
*
The parameters pattern follows the name pattern and is optional. It is used to check the number of parameters, or their types. When the parameters pattern is omitted, then the number and types of parameters are not considred when matching methods.
The parameters pattern, when present, is contained within open and closed parenthis after the method pattern. Inside the parenthesis may be a number, indicating the exact number of method parameters to match against. Alternately, a comma-seperated list of Java types is used, which matches against a method that takes the exact set of parameters. Examples:
perform()
-- method with no parameters perform(2)
-- method with two parameters perform(java.util.List, int)
- method taking a List and an int parameter
@author Howard Lewis Ship