|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectuk.ac.starlink.util.WrapUtils
public class WrapUtils
Utilities relating to the Wrapper
class.
Method Summary | |
---|---|
static java.lang.Object |
getWrapped(java.lang.Object obj)
Returns the object on which a given object is based. |
static java.lang.Object |
getWrapped(java.lang.Object obj,
java.lang.Class<?> clazz)
Attempts to return an object of a given class on which a given object is based. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static java.lang.Object getWrapped(java.lang.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 object
obj
public static java.lang.Object getWrapped(java.lang.Object obj, java.lang.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 object
clazz
, or null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |