|
|||||||||
| 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 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 object
obj
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 object
clazz, or null
|
Copyright © 2004 CLRC: Central Laboratory of the Research Councils. All rights reserved. | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||