Package io.micronaut.core.convert
Interface ArgumentConversionContext<T>
-
- Type Parameters:
T
- The type
- All Superinterfaces:
AnnotationMetadataProvider
,AnnotationSource
,ConversionContext
,ErrorsContext
,java.lang.Iterable<ConversionError>
,TypeVariableResolver
- All Known Subinterfaces:
ImmutableArgumentConversionContext<T>
public interface ArgumentConversionContext<T> extends ConversionContext, AnnotationMetadataProvider
Extended version of theConversionContext
specifically for conversionArgument
instances.- Since:
- 1.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Fields inherited from interface io.micronaut.core.convert.ConversionContext
BOOLEAN, DEFAULT, INT, LIST_OF_STRING, LONG, MAP, STRING
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default AnnotationMetadata
getAnnotationMetadata()
Supplies the metadata.Argument<T>
getArgument()
default Argument[]
getTypeParameters()
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.default ArgumentConversionContext<T>
with(AnnotationMetadata annotationMetadata)
Augment this context with annotation metadata.-
Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
-
Methods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
-
Methods inherited from interface io.micronaut.core.convert.ConversionContext
getCharset, getLocale, with
-
Methods inherited from interface io.micronaut.core.convert.ErrorsContext
getLastError, hasErrors, iterator, reject, reject
-
Methods inherited from interface io.micronaut.core.type.TypeVariableResolver
getFirstTypeVariable, getTypeVariable
-
-
-
-
Method Detail
-
getTypeParameters
default Argument[] getTypeParameters()
- Specified by:
getTypeParameters
in interfaceTypeVariableResolver
- Returns:
- The type parameters as an array
-
getTypeVariables
default java.util.Map<java.lang.String,Argument<?>> getTypeVariables()
Description copied from interface:ConversionContext
In the case where the type to be converted contains generic type arguments this map will return the concrete types of those arguments. For example for theMap
type two keys will be present called 'K' and 'V' with the actual types of the key and value.- Specified by:
getTypeVariables
in interfaceConversionContext
- Specified by:
getTypeVariables
in interfaceTypeVariableResolver
- Returns:
- A map of type variables
-
getAnnotationMetadata
default AnnotationMetadata getAnnotationMetadata()
Description copied from interface:AnnotationMetadataProvider
Supplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA
.- Specified by:
getAnnotationMetadata
in interfaceAnnotationMetadataProvider
- Returns:
- The
AnnotationMetadata
-
with
default ArgumentConversionContext<T> with(AnnotationMetadata annotationMetadata)
Augment this context with annotation metadata.- Parameters:
annotationMetadata
- The annotation metadata- Returns:
- The conversion context
-
-