Interface TypeInformation<T>

    • Method Detail

      • getType

        @NonNull
        java.lang.Class<T> getType()
        Returns:
        The type
      • isPrimitive

        default boolean isPrimitive()
        Returns:
        Is the type primitive.
        Since:
        3.0.0
      • getWrapperType

        default java.lang.Class<?> getWrapperType()
        If the type is primitive returns the wrapper type, otherwise returns the actual type.
        Returns:
        The wrapper type if primitive
      • getTypeName

        @NonNull
        default java.lang.String getTypeName()
        Specified by:
        getTypeName in interface java.lang.reflect.Type
      • isReactive

        default boolean isReactive()
        Returns:
        Is the return type reactive.
        Since:
        2.0.0
      • isWrapperType

        default boolean isWrapperType()
        Returns whether this type is a wrapper type that wraps the actual type such as a Optional or a Response wrapper.
        Returns:
        True if it is a wrapper type.
        Since:
        2.4.0
      • getWrappedType

        default Argument<?> getWrappedType()
        Returns the wrapped type in the case where isWrapperType() returns true.
        Returns:
        The wrapped type
      • isCompletable

        default boolean isCompletable()
        Returns:
        Is the return the return type a reactive completable type.
        Since:
        2.0.0
      • isAsync

        default boolean isAsync()
        Returns:
        Is the return type asynchronous.
        Since:
        2.0.0
      • isAsyncOrReactive

        default boolean isAsyncOrReactive()
        Returns:
        Is the return type either async or reactive.
        Since:
        2.0.0
      • isContainerType

        default boolean isContainerType()
        Returns:
        Whether this is a container type.
      • hasTypeVariables

        default boolean hasTypeVariables()
        Returns:
        Whether the argument has any type variables
      • getTypeString

        default java.lang.String getTypeString​(boolean simple)
        Returns the string representation of the argument type, including generics.
        Parameters:
        simple - If true, output the simple name of types
        Returns:
        The type string representation
      • isVoid

        default boolean isVoid()
        Returns whether the return type is logically void. This includes reactive times that emit nothing (such as io.micronaut.core.async.subscriber.Completable) and asynchronous types that emit Void.
        Returns:
        Is the return type logically void.
        Since:
        2.0.0
      • isOptional

        default boolean isOptional()
        Returns:
        Is the return type Optional.
        Since:
        2.0.1
      • isSpecifiedSingle

        default boolean isSpecifiedSingle()
        Returns:
        Has the return type been specified to emit a single result with SingleResult.
        Since:
        2.0
      • asType

        @NonNull
        default java.lang.reflect.Type asType()
        Represent this argument as a Type.
        Returns:
        The Type
        Since:
        3.5.2
      • asParameterizedType

        @NonNull
        default java.lang.reflect.ParameterizedType asParameterizedType()
        Represent this argument as a ParameterizedType.
        Returns:
        The ParameterizedType
        Since:
        2.0.0
      • isArray

        default boolean isArray()
        Returns:
        Is the type an array.
        Since:
        2.4.0
      • getSimpleName

        @NonNull
        default java.lang.String getSimpleName()
        Obtains the type's simple name.
        Returns:
        The simple name
        Since:
        3.0.0
      • isProvider

        default boolean isProvider()