Top Description Methods
io.r2dbc.spi

public Interface Wrapped<T>

Type Parameters
<T>
The R2DBC SPI type being wrapped

Indicates that an instance wraps a concrete implementation of an R2DBC SPI interface. A wrapper is expected to implement this interface so that callers can extract the original instance.

Method Summary

Modifier and TypeMethod and Description
public T

Returns:

the original instance wrapped by this object
unwrap
()

Returns the original instance wrapped by this object.

public default <
returning type
E
>
E

Returns:

unwrapped instance of given type or null
unwrap
(Class<E>
target type to unwrap
targetClass
)

Recursively unwrap() the object and returns the first instance that matches to the given Class or null if none matches.

Method Detail

unwrapback to summary
public T unwrap()

Returns the original instance wrapped by this object.

Returns:T

the original instance wrapped by this object

unwrapback to summary
public default <E> E unwrap(Class<E> targetClass)

Recursively unwrap() the object and returns the first instance that matches to the given Class or null if none matches.

If this object is an instance of the given Class, this object is returned.

Parameters
<E>
returning type
targetClass:Class<E>

target type to unwrap

Returns:E

unwrapped instance of given type or null

Annotations
@Nullable
@SuppressWarnings:unchecked
Exceptions
IllegalArgumentException:
if targetClass is null
Since
0.9.0