Modifier and Type | Method and Description |
---|---|
static Object |
getWrapped(Object obj)
Returns the object on which a given object is based.
|
static Object |
getWrapped(Object obj,
Class<?> clazz)
Attempts to return an object of a given class on which a given
object is based.
|
public static Object getWrapped(Object obj)
obj
is a Wrapper
, it is unwrapped as far
as possible and the base object is returned.
Otherwise obj
itself is returned.obj
- test objectobj
public static Object getWrapped(Object obj, Class<?> clazz)
Wrapper.getBase()
) until an
object of class clazz
is found, at which point it
is returned. If no clazz
object can be found,
null
is returned.obj
- test objectclazz
, or nullCopyright © 2025 Central Laboratory of the Research Councils. All Rights Reserved.