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