T
- Type to convert from/to.public abstract class Converter<T>
extends java.lang.Object
String
and back. Most often used with
Convert
annotation with methods returning GenericDomValue
<T>.ResolvingConverter
,
CustomReferenceConverter
Modifier and Type | Field and Description |
---|---|
static Converter<java.lang.String> |
EMPTY_CONVERTER
Deprecated.
unnecessary
|
static Converter<java.lang.Integer> |
INTEGER_CONVERTER
Deprecated.
not necessary for Integer, use
NumberValueConverter |
Constructor and Description |
---|
Converter() |
Modifier and Type | Method and Description |
---|---|
abstract T |
fromString(java.lang.String s,
ConvertContext context) |
java.lang.String |
getErrorMessage(java.lang.String s,
ConvertContext context) |
abstract java.lang.String |
toString(T t,
ConvertContext context) |
@Deprecated public static final Converter<java.lang.Integer> INTEGER_CONVERTER
NumberValueConverter
@Deprecated public static final Converter<java.lang.String> EMPTY_CONVERTER
public abstract T fromString(java.lang.String s, ConvertContext context)
public abstract java.lang.String toString(T t, ConvertContext context)
public java.lang.String getErrorMessage(java.lang.String s, ConvertContext context)
s
- string value that couldn't be resolvedcontext
- context