Top Constructors Methods
org.junit.platform.commons.support.conversion

pack-priv Class StringToCharacterConverter

extends Object
implements StringToObjectConverter
Class Inheritance
All Implemented Interfaces
org.junit.platform.commons.support.conversion.StringToObjectConverter
Imports
org.junit.platform.commons.util.Preconditions

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public boolean
canConvertTo(Class<?> targetType)

Implements org.junit.platform.commons.support.conversion.StringToObjectConverter.canConvertTo.

Determine if this converter can convert from a String to the supplied target type (which is guaranteed to be a wrapper type for primitives — for example, Integer instead of int).

public Object
convert(String source, Class<?> targetType)

Implements org.junit.platform.commons.support.conversion.StringToObjectConverter.convert.

Convert the supplied String to the supplied target type (which is guaranteed to be a wrapper type for primitives — for example, Integer instead of int).

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

StringToCharacterConverterback to summary
pack-priv StringToCharacterConverter()

Method Detail

canConvertToback to summary
public boolean canConvertTo(Class<?> targetType)

Implements org.junit.platform.commons.support.conversion.StringToObjectConverter.canConvertTo.

Doc from org.junit.platform.commons.support.conversion.StringToObjectConverter.canConvertTo.

Determine if this converter can convert from a String to the supplied target type (which is guaranteed to be a wrapper type for primitives — for example, Integer instead of int).

Annotations
@Override
convertback to summary
public Object convert(String source, Class<?> targetType)

Implements org.junit.platform.commons.support.conversion.StringToObjectConverter.convert.

Doc from org.junit.platform.commons.support.conversion.StringToObjectConverter.convert.

Convert the supplied String to the supplied target type (which is guaranteed to be a wrapper type for primitives — for example, Integer instead of int).

This method will only be invoked if canConvertTo(Class) returns true for the same target type.

Annotations
@Override