Package org.junit.jupiter.params
Class ParameterizedTestSpiInstantiator
- java.lang.Object
-
- org.junit.jupiter.params.ParameterizedTestSpiInstantiator
-
class ParameterizedTestSpiInstantiator extends java.lang.Object- Since:
- 5.12
-
-
Constructor Summary
Constructors Constructor Description ParameterizedTestSpiInstantiator()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description private static <T> java.lang.reflect.Constructor<?>findBestConstructor(java.lang.Class<T> spiInterface, java.lang.Class<? extends T> implementationClass)Find the "best" constructor for the supplied implementation class.private static <T> java.lang.reflect.Constructor<? extends T>findConstructor(java.lang.Class<T> spiInterface, java.lang.Class<? extends T> implementationClass)(package private) static <T> Tinstantiate(java.lang.Class<T> spiInterface, java.lang.Class<? extends T> implementationClass, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
-
-
-
Method Detail
-
instantiate
static <T> T instantiate(java.lang.Class<T> spiInterface, java.lang.Class<? extends T> implementationClass, org.junit.jupiter.api.extension.ExtensionContext extensionContext)
-
findConstructor
private static <T> java.lang.reflect.Constructor<? extends T> findConstructor(java.lang.Class<T> spiInterface, java.lang.Class<? extends T> implementationClass)
-
findBestConstructor
private static <T> java.lang.reflect.Constructor<?> findBestConstructor(java.lang.Class<T> spiInterface, java.lang.Class<? extends T> implementationClass)Find the "best" constructor for the supplied implementation class.For backward compatibility, it first checks for a single constructor and returns that. If there are multiple constructors, it checks for a default constructor which takes precedence over any other constructors. Otherwise, this method throws an exception stating that it failed to find a suitable constructor.
-
-