Class MethodSource
- java.lang.Object
-
- org.junit.platform.engine.support.descriptor.MethodSource
-
- All Implemented Interfaces:
Serializable
,TestSource
@API(status=STABLE, since="1.0") public class MethodSource extends Object implements TestSource
Java method basedTestSource
.This class stores the method name along with its parameter types because
Method
does not implementSerializable
.- Since:
- 1.0
- See Also:
MethodSelector
, Serialized Form
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
static MethodSource
from(Method method)
Create a newMethodSource
using the suppliedmethod
.static MethodSource
from(String className, String methodName)
Create a newMethodSource
using the supplied class and method name.static MethodSource
from(String className, String methodName, String methodParameterTypes)
Create a newMethodSource
using the supplied class and method name.String
getClassName()
Get the declaringClass
name of this source.String
getMethodName()
Get theMethod
name of this source.String
getMethodParameterTypes()
Get theMethod
parameter types of this source.int
hashCode()
String
toString()
-
-
-
Method Detail
-
from
public static MethodSource from(String className, String methodName)
Create a newMethodSource
using the supplied class and method name.
-
from
public static MethodSource from(String className, String methodName, String methodParameterTypes)
Create a newMethodSource
using the supplied class and method name.
-
from
public static MethodSource from(Method method)
Create a newMethodSource
using the suppliedmethod
.- Parameters:
method
- the Java method; must not benull
-
getMethodParameterTypes
public final String getMethodParameterTypes()
Get theMethod
parameter types of this source.
-
-