Package io.micronaut.core.type
Interface ReturnType<T>
-
- Type Parameters:
T
- The concrete type
- All Superinterfaces:
AnnotationMetadataProvider
,AnnotationSource
,ArgumentCoercible<T>
,java.lang.reflect.Type
,TypeInformation<T>
,TypeVariableResolver
public interface ReturnType<T> extends TypeInformation<T>, AnnotationMetadataProvider, ArgumentCoercible<T>
Models a return type of anExecutable
method in Micronaut.- Since:
- 1.0
-
-
Field Summary
-
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY
-
-
Method Summary
All Methods Static Methods Instance Methods Default Methods Modifier and Type Method Description default Argument<T>
asArgument()
default boolean
isSingleResult()
default boolean
isSuspended()
static <T1> ReturnType<T1>
of(java.lang.Class<T1> type, Argument<?>... typeArguments)
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, 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 Detail
-
asArgument
@NonNull default Argument<T> 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
static <T1> ReturnType<T1> of(java.lang.Class<T1> type, Argument<?>... typeArguments)
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
-
-