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 theConversionContextspecifically for conversionArgumentinstances.- 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 AnnotationMetadatagetAnnotationMetadata()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:
getTypeParametersin interfaceTypeVariableResolver- Returns:
- The type parameters as an array
-
getTypeVariables
default java.util.Map<java.lang.String,Argument<?>> getTypeVariables()
Description copied from interface:ConversionContextIn 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 theMaptype two keys will be present called 'K' and 'V' with the actual types of the key and value.- Specified by:
getTypeVariablesin interfaceConversionContext- Specified by:
getTypeVariablesin interfaceTypeVariableResolver- Returns:
- A map of type variables
-
getAnnotationMetadata
default AnnotationMetadata getAnnotationMetadata()
Description copied from interface:AnnotationMetadataProviderSupplies the metadata. Defaults toAnnotationMetadata.EMPTY_METADATA.- Specified by:
getAnnotationMetadatain 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
-
-