public final class ReactiveWrappers extends Object
Supported types are discovered by their availability on the class path. This class is typically used to determine multiplicity and whether a reactive wrapper type is acceptable for a specific operation.
Publisher
,
Single
,
Observable
,
Completable
,
Single
,
Maybe
,
Observable
,
Completable
,
Flowable
,
Mono
,
Flux
Modifier and Type | Method and Description |
---|---|
static Collection<Class<?>> |
getMultiValueTypes()
Returns a collection of multi-value wrapper types.
|
static Collection<Class<?>> |
getNoValueTypes()
Returns a collection of no-value wrapper types.
|
static Collection<Class<?>> |
getSingleValueTypes()
Returns a collection of single-value wrapper types.
|
static boolean |
isAvailable()
Returns true if reactive support is available.
|
static boolean |
isAvailable(org.springframework.data.repository.util.ReactiveWrappers.ReactiveLibrary reactiveLibrary)
Returns true if the
ReactiveLibrary is available. |
static boolean |
isMultiValueType(Class<?> type)
Returns true if
type is a reactive wrapper type supporting multiple values (0..N
elements). |
static boolean |
isNoValueType(Class<?> type)
Returns true if
type is a reactive wrapper type that contains no value. |
static boolean |
isSingleValueType(Class<?> type)
Returns true if
type is a reactive wrapper type for a single value. |
static boolean |
supports(Class<?> type)
Returns true if the
type is a supported reactive wrapper type. |
static boolean |
usesReactiveType(Class<?> type)
Returns whether the given type uses any reactive wrapper type in its method signatures.
|
public static boolean isAvailable()
ReactiveLibrary
are on the class path.public static boolean isAvailable(org.springframework.data.repository.util.ReactiveWrappers.ReactiveLibrary reactiveLibrary)
ReactiveLibrary
is available.reactiveLibrary
- must not be null.ReactiveLibrary
is available.public static boolean supports(Class<?> type)
type
is a supported reactive wrapper type.type
- must not be null.type
is a supported reactive wrapper type.public static boolean usesReactiveType(Class<?> type)
type
- must not be null.public static boolean isNoValueType(Class<?> type)
type
is a reactive wrapper type that contains no value.type
- must not be null.type
is a reactive wrapper type that contains no value.public static boolean isSingleValueType(Class<?> type)
type
is a reactive wrapper type for a single value.type
- must not be null.type
is a reactive wrapper type for a single value.public static boolean isMultiValueType(Class<?> type)
type
is a reactive wrapper type supporting multiple values (0..N
elements).type
- must not be null.type
is a reactive wrapper type supporting multiple values (0..N
elements).public static Collection<Class<?>> getNoValueTypes()
public static Collection<Class<?>> getSingleValueTypes()
public static Collection<Class<?>> getMultiValueTypes()
Copyright © 2011–2019 Pivotal Software, Inc.. All rights reserved.