@API(status=STABLE, since="1.0") public class MethodSource extends Object implements TestSource
TestSource
.
This class stores the method name along with its parameter types because
Method
does not implement Serializable
.
MethodSelector
,
Serialized FormModifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
static MethodSource |
from(Method method)
Create a new
MethodSource using the supplied
method . |
static MethodSource |
from(String className,
String methodName)
Create a new
MethodSource using the supplied
class and method name. |
static MethodSource |
from(String className,
String methodName,
String methodParameterTypes)
Create a new
MethodSource using the supplied
class and method name. |
String |
getClassName()
Get the declaring
Class name of this source. |
String |
getMethodName()
Get the
Method name of this source. |
String |
getMethodParameterTypes()
Get the
Method parameter types of this source. |
int |
hashCode() |
String |
toString() |
public static MethodSource from(String className, String methodName)
MethodSource
using the supplied
class and method name.public static MethodSource from(String className, String methodName, String methodParameterTypes)
MethodSource
using the supplied
class and method name.public static MethodSource from(Method method)
MethodSource
using the supplied
method
.method
- the Java method; must not be null
public final String getMethodParameterTypes()
Method
parameter types of this source.