public class MethodNameAndParameterMatcher extends MethodNameMatcher
MethodNameMatcher
. The list of parameters must
be an exact match.
Example:
new MethodNameAndParameterMatcher("testMethod", int.class, String.class) would match the following method.
testMethod(int p1, String p2)
However, it would not match the following methods.
testMethod(int p1)
testMethod(String p1, int p2)
Constructor and Description |
---|
MethodNameAndParameterMatcher(String methodName,
Class<?>... methodParameters) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
int |
hashCode() |
boolean |
matches(Method method)
Determines is the method meets the selection criteria.
|
public boolean matches(Method method)
MethodMatcher
matches
in interface MethodMatcher
matches
in class MethodNameMatcher
method
- The method to testpublic boolean equals(Object o)
equals
in class MethodNameMatcher
public int hashCode()
hashCode
in class MethodNameMatcher
Copyright © 2002-2016 P6Spy. All Rights Reserved.