final class OptionalIntStringConverter extends AbstractTypeStringConverter implements TypedStringConverter<java.lang.Object>
This is loaded by reflection only when using Java 8.
| Modifier and Type | Field and Description |
|---|---|
private static java.lang.Object |
EMPTY |
private static java.lang.reflect.Method |
METHOD_GET |
private static java.lang.reflect.Method |
METHOD_IS_PRESENT |
private static java.lang.reflect.Method |
METHOD_OF |
private static java.lang.Class<?> |
TYPE |
| Constructor and Description |
|---|
OptionalIntStringConverter() |
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
convertFromString(java.lang.Class<? extends java.lang.Object> cls,
java.lang.String str)
Converts the specified object from a
String. |
java.lang.String |
convertToString(java.lang.Object object)
Converts the specified object to a
String. |
java.lang.Class<?> |
getEffectiveType()
Gets the effective type that the converter works on.
|
parseprivate static final java.lang.Class<?> TYPE
private static final java.lang.Object EMPTY
private static final java.lang.reflect.Method METHOD_OF
private static final java.lang.reflect.Method METHOD_IS_PRESENT
private static final java.lang.reflect.Method METHOD_GET
public java.lang.String convertToString(java.lang.Object object)
ToStringConverterString.convertToString in interface ToStringConverter<java.lang.Object>object - the object to convert, not nullpublic java.lang.Object convertFromString(java.lang.Class<? extends java.lang.Object> cls,
java.lang.String str)
FromStringConverterString.convertFromString in interface FromStringConverter<java.lang.Object>cls - the class to convert to, not nullstr - the string to convert, not nullpublic java.lang.Class<?> getEffectiveType()
TypedStringConverter
For example, if a class declares the FromString and ToString
then the effective type of the converter is that class. If a subclass is
queried for a converter, then the effective type is that of the superclass.
getEffectiveType in interface TypedStringConverter<java.lang.Object>