interface StringToObjectConverter
String to a specified
target type.| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(java.lang.Class<?> targetType)
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). |
java.lang.Object |
convert(java.lang.String source,
java.lang.Class<?> targetType)
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). |
default java.lang.Object |
convert(java.lang.String source,
java.lang.Class<?> targetType,
java.lang.ClassLoader classLoader)
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). |
boolean canConvert(java.lang.Class<?> targetType)
String to the
supplied target type (which is guaranteed to be a wrapper type for
primitives — for example, Integer instead of int).java.lang.Object convert(java.lang.String source,
java.lang.Class<?> targetType)
throws java.lang.Exception
String to the supplied target type (which is
guaranteed to be a wrapper type for primitives — for example,
Integer instead of int).java.lang.Exceptiondefault java.lang.Object convert(java.lang.String source,
java.lang.Class<?> targetType,
java.lang.ClassLoader classLoader)
throws java.lang.Exception
String to the supplied target type (which is
guaranteed to be a wrapper type for primitives — for example,
Integer instead of int).
The default implementation simply delegates to convert(String, Class).
Can be overridden by concrete implementations of this interface that need
access to the supplied ClassLoader.
java.lang.Exception