Package io.micronaut.core.type
Interface TypeInformationProvider
-
public interface TypeInformationProvider
Interface that implementors can hook into to control the logic of methods likeTypeInformation.isReactive()
.- Since:
- 2.4.0
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default boolean
isCompletable(java.lang.Class<?> type)
does the type represent a completable type.default boolean
isReactive(java.lang.Class<?> type)
does the type represent a reactive type.default boolean
isSingle(java.lang.Class<?> type)
does the given type represent a type that emits a single item.default boolean
isSpecifiedSingle(AnnotationMetadataProvider annotationMetadataProvider)
Returns whether the annotation metadata specifies the type as single.default boolean
isWrapperType(java.lang.Class<?> type)
Does the type represent a wrapper type.
-
-
-
Method Detail
-
isSpecifiedSingle
default boolean isSpecifiedSingle(@NonNull AnnotationMetadataProvider annotationMetadataProvider)
Returns whether the annotation metadata specifies the type as single.- Parameters:
annotationMetadataProvider
- The annotation metadata provider- Returns:
- True if does
-
isSingle
default boolean isSingle(@NonNull java.lang.Class<?> type)
does the given type represent a type that emits a single item.- Parameters:
type
- True if it does- Returns:
- True if it is single
-
isReactive
default boolean isReactive(@NonNull java.lang.Class<?> type)
does the type represent a reactive type.- Parameters:
type
- The type- Returns:
- True if it is reactive
-
isCompletable
default boolean isCompletable(@NonNull java.lang.Class<?> type)
does the type represent a completable type.- Parameters:
type
- The type- Returns:
- True if it is completable
-
isWrapperType
default boolean isWrapperType(java.lang.Class<?> type)
Does the type represent a wrapper type.- Parameters:
type
- The type- Returns:
- True if it is a wrapper type
- See Also:
TypeInformation.isWrapperType()
-
-