Package io.micronaut.core.type
Interface TypeInformationProvider
- All Known Implementing Classes:
HttpTypeInformationProvider
,ProviderTypeInformationProvider
,ReactiveStreamsTypeInformationProvider
public interface TypeInformationProvider
Interface that implementors can hook into to control the logic of methods like
TypeInformation.isReactive()
.- Since:
- 2.4.0
- Author:
- graemerocher
-
Method Summary
Modifier and TypeMethodDescriptiondefault boolean
isCompletable
(@NonNull Class<?> type) does the type represent a completable type.default boolean
isReactive
(@NonNull Class<?> type) does the type represent a reactive type.default boolean
does the given type represent a type that emits a single item.default boolean
isSpecifiedSingle
(@NonNull AnnotationMetadataProvider annotationMetadataProvider) Returns whether the annotation metadata specifies the type as single.default boolean
isWrapperType
(Class<?> type) Does the type represent a wrapper type.
-
Method Details
-
isSpecifiedSingle
default boolean isSpecifiedSingle(@NonNull @NonNull AnnotationMetadataProvider annotationMetadataProvider) Returns whether the annotation metadata specifies the type as single.- Parameters:
annotationMetadataProvider
- The annotation metadata provider- Returns:
- True if it does
-
isSingle
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
does the type represent a reactive type.- Parameters:
type
- The type- Returns:
- True if it is reactive
-
isCompletable
does the type represent a completable type.- Parameters:
type
- The type- Returns:
- True if it is completable
-
isWrapperType
Does the type represent a wrapper type.- Parameters:
type
- The type- Returns:
- True if it is a wrapper type
- See Also:
-