public interface ConversionContext extends AnnotationMetadataProvider, TypeVariableResolver, ErrorsContext
TypeConverter
that allows more accurate conversion.Modifier and Type | Field and Description |
---|---|
static ArgumentConversionContext<java.lang.Boolean> |
BOOLEAN
Constant for Boolean argument.
|
static ConversionContext |
DEFAULT
The default conversion context.
|
static ArgumentConversionContext<java.lang.Integer> |
INT
Constant for Integer argument.
|
static ArgumentConversionContext<java.util.List<java.lang.String>> |
LIST_OF_STRING
Constant for List
|
static ArgumentConversionContext<java.lang.Long> |
LONG
Constant for Long argument.
|
static ArgumentConversionContext<java.util.Map> |
MAP
Constant for List
|
static ArgumentConversionContext<java.lang.String> |
STRING
Constant for String argument.
|
EMPTY
Modifier and Type | Method and Description |
---|---|
default java.nio.charset.Charset |
getCharset() |
default java.util.Locale |
getLocale() |
default java.util.Map<java.lang.String,Argument<?>> |
getTypeVariables()
In the case where the type to be converted contains generic type arguments this map will return
the concrete types of those arguments.
|
static <T> ArgumentConversionContext<T> |
of(Argument<T> argument)
Create a simple
ConversionContext for the given generic type variables. |
static <T> ArgumentConversionContext |
of(Argument<T> argument,
java.util.Locale locale)
Create a simple
ConversionContext for the given generic type variables. |
static <T> ArgumentConversionContext<T> |
of(Argument<T> argument,
java.util.Locale locale,
java.nio.charset.Charset charset)
Create a simple
ConversionContext for the given generic type variables. |
static <T> ArgumentConversionContext<T> |
of(java.lang.Class<T> argument)
Create a simple
ConversionContext for the given generic type variables. |
static ConversionContext |
of(java.util.Map<java.lang.String,Argument<?>> typeVariables)
Create a simple
ConversionContext for the given generic type variables. |
default <T> ArgumentConversionContext<T> |
with(Argument<T> argument)
Augment this context with data for the given argument.
|
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation
getFirstTypeVariable, getTypeParameters, getTypeVariable
getLastError, hasErrors, iterator, reject, reject
static final ConversionContext DEFAULT
static final ArgumentConversionContext<java.lang.Boolean> BOOLEAN
static final ArgumentConversionContext<java.lang.Integer> INT
static final ArgumentConversionContext<java.lang.Long> LONG
static final ArgumentConversionContext<java.lang.String> STRING
static final ArgumentConversionContext<java.util.List<java.lang.String>> LIST_OF_STRING
static final ArgumentConversionContext<java.util.Map> MAP
default java.util.Map<java.lang.String,Argument<?>> getTypeVariables()
Map
type two keys will be present
called 'K' and 'V' with the actual types of the key and value.getTypeVariables
in interface TypeVariableResolver
default java.util.Locale getLocale()
default java.nio.charset.Charset getCharset()
default <T> ArgumentConversionContext<T> with(Argument<T> argument)
T
- type Genericargument
- The argumentstatic ConversionContext of(java.util.Map<java.lang.String,Argument<?>> typeVariables)
ConversionContext
for the given generic type variables.typeVariables
- The type variablesstatic <T> ArgumentConversionContext<T> of(Argument<T> argument)
ConversionContext
for the given generic type variables.T
- type Genericargument
- The argumentstatic <T> ArgumentConversionContext<T> of(java.lang.Class<T> argument)
ConversionContext
for the given generic type variables.T
- type Genericargument
- The argumentstatic <T> ArgumentConversionContext of(Argument<T> argument, @Nullable java.util.Locale locale)
ConversionContext
for the given generic type variables.T
- type Genericargument
- The argumentlocale
- The localestatic <T> ArgumentConversionContext<T> of(Argument<T> argument, @Nullable java.util.Locale locale, @Nullable java.nio.charset.Charset charset)
ConversionContext
for the given generic type variables.T
- type Genericargument
- The argumentlocale
- The localecharset
- The charset