Module org.junit.jupiter.params
Class StringToClassConverter
java.lang.Object
org.junit.jupiter.params.converter.StringToClassConverter
- All Implemented Interfaces:
StringToObjectConverter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleancanConvert(Class<?> targetType) convert(String className, Class<?> targetType, ClassLoader classLoader)
-
Constructor Details
-
StringToClassConverter
StringToClassConverter()
-
-
Method Details
-
canConvert
Description copied from interface:StringToObjectConverterDetermine if this converter can convert from aStringto the supplied target type (which is guaranteed to be a wrapper type for primitives — for example,Integerinstead ofint).- Specified by:
canConvertin interfaceStringToObjectConverter
-
convert
Description copied from interface:StringToObjectConverterConvert the suppliedStringto the supplied target type (which is guaranteed to be a wrapper type for primitives — for example,Integerinstead ofint).- Specified by:
convertin interfaceStringToObjectConverter- Throws:
Exception
-
convert
public Object convert(String className, Class<?> targetType, ClassLoader classLoader) throws Exception Description copied from interface:StringToObjectConverterConvert the suppliedStringto the supplied target type (which is guaranteed to be a wrapper type for primitives — for example,Integerinstead ofint).The default implementation simply delegates to
StringToObjectConverter.convert(String, Class). Can be overridden by concrete implementations of this interface that need access to the suppliedClassLoader.- Specified by:
convertin interfaceStringToObjectConverter- Throws:
Exception
-