The fromString method must meet the following signature:
static T anyName(String) on any class.
MethodFromStringConverter is thread-safe and immutable.
| Modifier and Type | Field and Description |
|---|---|
| private final Class | effectiveType
Effective type. |
| private final Method | fromString
Conversion from a string. |
| Access | Constructor and Description |
|---|---|
| pack-priv | MethodFromStringConverter(Class<T>
the class this converts for, not null cls, Method the fromString method, not null fromString, Class<?> effectiveType)Creates an instance using two methods. |
| Modifier and Type | Method and Description |
|---|---|
| public T | convertFromString(Class<? extends T>
the class to convert to, not null cls, String the string to convert, not null str)Implements org. String.
|
| public Class | getEffectiveType()
Implements org. |
| effectiveType | back to summary |
|---|---|
| private final Class<?> effectiveType Effective type. | |
| fromString | back to summary |
|---|---|
| private final Method fromString Conversion from a string. | |
| MethodFromStringConverter | back to summary |
|---|---|
| pack-priv MethodFromStringConverter(Class<T> cls, Method fromString, Class<?> effectiveType) Creates an instance using two methods.
| |
| convertFromString | back to summary |
|---|---|
| public T convertFromString(Class<? extends T> cls, String str) Implements org. Doc from org. Converts the specified object from a | |
| getEffectiveType | back to summary |
|---|---|
| public Class Implements org. Doc from org. Gets the effective type that the converter works on.
For example, if a class declares the | |