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
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.micronaut.core.type.TypeInformation
TypeInformation.TypeFormat -
Field Summary
Fields inherited from interface io.micronaut.core.annotation.AnnotationSource
EMPTY -
Method Summary
Modifier and TypeMethodDescriptiondefault booleandefault booleanstatic <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, synthesizeDeclaredAnnotationsByTypeMethods inherited from interface io.micronaut.core.annotation.AnnotationSource
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclaredMethods inherited from interface io.micronaut.core.type.TypeInformation
asParameterizedType, asType, getBeanTypeString, getSimpleName, getType, getTypeName, getTypeString, getTypeString, getWrappedType, getWrapperType, hasTypeVariables, isArray, isAsync, isAsyncOrReactive, isCompletable, isContainerType, isOptional, isPrimitive, isProvider, isReactive, isSpecifiedSingle, isVoid, isWrapperTypeMethods inherited from interface io.micronaut.core.type.TypeVariableResolver
getFirstTypeVariable, getTypeParameters, getTypeVariable, getTypeVariables
-
Method Details
-
asArgument
- Specified by:
asArgumentin 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
-