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
  • Method Details

    • asArgument

      @NonNull default @NonNull Argument<T> asArgument()
      Specified by:
      asArgument in interface ArgumentCoercible<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(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 type
      typeArguments - The type arguments
      Returns:
      A ReturnType