ContextConverterRegistrar
@Deprecated public class StringToClassConverter extends java.lang.Object implements TypeConverter<java.lang.CharSequence,java.lang.Class>
Constructor and Description |
---|
StringToClassConverter(java.lang.ClassLoader classLoader)
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
java.util.Optional<java.lang.Class> |
convert(java.lang.CharSequence object,
java.lang.Class<java.lang.Class> targetType,
ConversionContext context)
Deprecated.
Converts from the given source object type to the target type.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
convert, of
public StringToClassConverter(java.lang.ClassLoader classLoader)
classLoader
- The class loaderpublic java.util.Optional<java.lang.Class> convert(java.lang.CharSequence object, java.lang.Class<java.lang.Class> targetType, ConversionContext context)
TypeConverter
Optional.empty()
in case the object is not convertible by catching any necessary exceptions and failing gracefully.convert
in interface TypeConverter<java.lang.CharSequence,java.lang.Class>
object
- The object typetargetType
- The target type being converted tocontext
- The ConversionContext