public interface Wrapper
| Modifier and Type | Method and Description |
|---|---|
default <C> Optional<C> |
maybeUnwrap(Class<C> aClass)
Finds an instance of an interface implemented by this object,
or returns
Optional.empty() if this object does not support
that interface. |
<C> C |
unwrap(Class<C> aClass)
Finds an instance of an interface implemented by this object,
or returns null if this object does not support that interface.
|
default <C> C |
unwrapOrThrow(Class<C> aClass)
Finds an instance of an interface implemented by this object,
or throws NullPointerException if this object does not support
that interface.
|
<C> C unwrap(Class<C> aClass)
@API(since="1.27",
status=INTERNAL)
default <C> C unwrapOrThrow(Class<C> aClass)
@API(since="1.27",
status=INTERNAL)
default <C> Optional<C> maybeUnwrap(Class<C> aClass)
Optional.empty() if this object does not support
that interface.Copyright © 2012-2022 Apache Software Foundation. All Rights Reserved.