public static enum StandardConverters.ToStringConverter extends java.lang.Enum<StandardConverters.ToStringConverter> implements Converter
Converter that will convert any Object to a String by
calling its toString method.| Enum Constant and Description |
|---|
INSTANCE
The instance of this converter
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canConvert(java.lang.Class<?> sourceType,
java.lang.Class<?> targetType)
Returns true if objects of sourceType can be converted to targetType.
|
<T> T |
convert(java.lang.Object source,
java.lang.Class<T> targetType)
Convert the source to targetType.
|
static StandardConverters.ToStringConverter |
valueOf(java.lang.String name)
Returns the enum constant of this type with the specified name.
|
static StandardConverters.ToStringConverter[] |
values()
Returns an array containing the constants of this enum type, in
the order they are declared.
|
public static final StandardConverters.ToStringConverter INSTANCE
public static StandardConverters.ToStringConverter[] values()
for (StandardConverters.ToStringConverter c : StandardConverters.ToStringConverter.values()) System.out.println(c);
public static StandardConverters.ToStringConverter valueOf(java.lang.String name)
name - the name of the enum constant to be returned.java.lang.IllegalArgumentException - if this enum type has no constant with the specified namejava.lang.NullPointerException - if the argument is nullpublic boolean canConvert(java.lang.Class<?> sourceType,
java.lang.Class<?> targetType)
ConverterConverter.convert(Object, Class) is capable of converting an instance of sourceType to targetType.canConvert in interface ConvertersourceType - the source type to convert when (may be null if source is null)targetType - the target type to convert to (required)public <T> T convert(java.lang.Object source,
java.lang.Class<T> targetType)
Converter