Package io.micronaut.core.type
Interface ReturnType<T>
- Type Parameters:
T
- The concrete type
- All Superinterfaces:
AnnotationMetadataProvider
,AnnotationSource
,ArgumentCoercible<T>
,Type
,TypeInformation<T>
,TypeVariableResolver
public interface ReturnType<T>
extends TypeInformation<T>, AnnotationMetadataProvider, ArgumentCoercible<T>
Models a return type of
Executable
method in Micronaut.- Since:
- 1.0
- Author:
- Graeme Rocher
-
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
default boolean
static <T1> ReturnType<T1>
Create a new return type from the given type and arguments.Methods inherited from interface io.micronaut.core.annotation.AnnotationMetadataProvider
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, getTargetAnnotationMetadata, 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.type.TypeInformation
asParameterizedType, asType, getSimpleName, getType, getTypeName, getTypeString, getWrappedType, getWrapperType, hasTypeVariables, isArray, isAsync, isAsyncOrReactive, isCompletable, isContainerType, isOptional, isPrimitive, isProvider, isReactive, isSpecifiedSingle, isVoid, isWrapperType
Methods inherited from interface io.micronaut.core.type.TypeVariableResolver
getFirstTypeVariable, getTypeParameters, getTypeVariable, getTypeVariables
-
Method Details
-
asArgument
- Specified by:
asArgument
in interfaceArgumentCoercible<T>
- Returns:
- The return type as an argument
-
isSuspended
default boolean isSuspended()- Returns:
- Is the return type suspended function (Kotlin).
- Since:
- 2.0.0
-
isSingleResult
default boolean isSingleResult()- Returns:
- Is the return type a single result or multiple results
- Since:
- 2.0
-
of
Create a new return type from the given type and arguments.- Type Parameters:
T1
- The return type- Parameters:
type
- The typetypeArguments
- The type arguments- Returns:
- A
ReturnType
-