T
- The generic typepublic interface TypeInformation<T> extends TypeVariableResolver, AnnotationMetadataProvider, Type
EMPTY
Modifier and Type | Method and Description |
---|---|
default ParameterizedType |
asParameterizedType()
Represent this argument as a
ParameterizedType . |
default Type |
asType()
Represent this argument as a
Type . |
default String |
getSimpleName()
Obtains the type's simple name.
|
Class<T> |
getType() |
default String |
getTypeName() |
default String |
getTypeString(boolean simple)
Returns the string representation of the argument type, including generics.
|
default Argument<?> |
getWrappedType()
Returns the wrapped type in the case where
isWrapperType() returns true. |
default Class<?> |
getWrapperType()
If the type is primitive returns the wrapper type, otherwise returns the actual type.
|
default boolean |
hasTypeVariables() |
default boolean |
isArray() |
default boolean |
isAsync() |
default boolean |
isAsyncOrReactive() |
default boolean |
isCompletable() |
default boolean |
isContainerType() |
default boolean |
isOptional() |
default boolean |
isPrimitive() |
default boolean |
isProvider() |
default boolean |
isReactive() |
default boolean |
isSpecifiedSingle() |
default boolean |
isVoid()
Returns whether the return type is logically void.
|
default boolean |
isWrapperType()
Returns whether this type is a wrapper type that wraps the actual type such as a Optional or a Response wrapper.
|
getFirstTypeVariable, getTypeParameters, getTypeVariable, getTypeVariables
findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotationMetadata, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotation, getAnnotation, getDeclaredAnnotation, getDeclaredAnnotation, isAnnotationPresent, isDeclaredAnnotationPresent, synthesize, synthesizeDeclared
default boolean isPrimitive()
default Class<?> getWrapperType()
@NonNull default String getTypeName()
getTypeName
in interface Type
default boolean isReactive()
default boolean isWrapperType()
default Argument<?> getWrappedType()
isWrapperType()
returns true.default boolean isCompletable()
default boolean isAsync()
default boolean isAsyncOrReactive()
default boolean isContainerType()
default boolean hasTypeVariables()
default String getTypeString(boolean simple)
simple
- If true, output the simple name of typesdefault boolean isVoid()
io.micronaut.core.async.subscriber.Completable
)
and asynchronous types that emit Void
.default boolean isOptional()
Optional
.default boolean isSpecifiedSingle()
SingleResult
.@NonNull default Type asType()
Type
.Type
@NonNull default ParameterizedType asParameterizedType()
ParameterizedType
.ParameterizedType
default boolean isArray()
@NonNull default String getSimpleName()
default boolean isProvider()