org.springframework.data.repository.util

## Class ReactiveWrappers

- java.lang.Object
- - org.springframework.data.repository.util.ReactiveWrappers

    public abstract class ReactiveWrappers
    extends Object

Utility class to expose details about reactive wrapper types. This class exposes whether a reactive wrapper is supported in general and whether a particular type is suitable for no-value/single-value/multi-value usage.

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.

Note: As of Spring Data 2.4, support for RxJava 1.x is deprecated in favor of RxJava 2 and 3.

Since:
  2.0
Author:
  Mark Paluch, Christoph Strobl, Oliver Gierke, Gerrit Meier
See Also:
  `Publisher`, `Single`, `Observable`, `Completable`, `Single`, `Maybe`, `Observable`, `Completable`, `Flowable`, `Single`, `Maybe`, `Observable`, `Completable`, `Flowable`, `Mono`, `Flux`

### Nested Class Summary

Nested Classes
`static class` `ReactiveWrappers.ReactiveLibrary` Enumeration of supported reactive libraries.

### Method Summary

All Methods Static Methods Concrete Methods Deprecated Methods
`static Collection<Class<?>>` `getMultiValueTypes()` Deprecated. not supported anymore.
`static Collection<Class<?>>` `getNoValueTypes()` Deprecated. not supported anymore.
`static Collection<Class<?>>` `getSingleValueTypes()` Deprecated. not supported anymore.
`static boolean` `isAvailable()` Returns true if reactive support is available.
`static boolean` `isAvailable(ReactiveWrappers.ReactiveLibrary reactiveLibrary)` Returns true if the `ReactiveWrappers.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.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### isAvailable

    public static boolean isAvailable()

Returns true if reactive support is available. More specifically, whether any of the libraries defined in `ReactiveWrappers.ReactiveLibrary` are on the class path.

Returns:
  true if reactive support is available.

#### isAvailable

    public static boolean isAvailable(ReactiveWrappers.ReactiveLibrary reactiveLibrary)

Returns true if the `ReactiveWrappers.ReactiveLibrary` is available.

Parameters:
  `reactiveLibrary` - must not be null.
Returns:
  true if the `ReactiveWrappers.ReactiveLibrary` is available.

#### supports

    public static boolean supports(Class<?> type)

Returns true if the `type` is a supported reactive wrapper type.

Parameters:
  `type` - must not be null.
Returns:
  true if the `type` is a supported reactive wrapper type.

#### usesReactiveType

    public static boolean usesReactiveType(Class<?> type)

Returns whether the given type uses any reactive wrapper type in its method signatures.

Parameters:
  `type` - must not be null.
Returns:

#### isNoValueType

    public static boolean isNoValueType(Class<?> type)

Returns true if `type` is a reactive wrapper type that contains no value.

Parameters:
  `type` - must not be null.
Returns:
  true if `type` is a reactive wrapper type that contains no value.

#### isSingleValueType

    public static boolean isSingleValueType(Class<?> type)

Returns true if `type` is a reactive wrapper type for a single value.

Parameters:
  `type` - must not be null.
Returns:
  true if `type` is a reactive wrapper type for a single value.

#### isMultiValueType

    public static boolean isMultiValueType(Class<?> type)

Returns true if `type` is a reactive wrapper type supporting multiple values (`0..N` elements).

Parameters:
  `type` - must not be null.
Returns:
  true if `type` is a reactive wrapper type supporting multiple values (`0..N` elements).

#### getNoValueTypes

    @Deprecated
    public static Collection<Class<?>> getNoValueTypes()

Deprecated. not supported anymore.
Returns a collection of no-value wrapper types.

Returns:
  a collection of no-value wrapper types.

#### getSingleValueTypes

    @Deprecated
    public static Collection<Class<?>> getSingleValueTypes()

Deprecated. not supported anymore.
Returns a collection of single-value wrapper types.

Returns:
  a collection of single-value wrapper types.

#### getMultiValueTypes

    @Deprecated
    public static Collection<Class<?>> getMultiValueTypes()

Deprecated. not supported anymore.
Returns a collection of multi-value wrapper types.

Returns:
  a collection of multi-value wrapper types.