Class WrapUtils
java.lang.Object
uk.ac.starlink.util.WrapUtils
-
Method Summary
Modifier and TypeMethodDescriptionstatic ObjectgetWrapped(Object obj) Returns the object on which a given object is based.static ObjectgetWrapped(Object obj, Class<?> clazz) Attempts to return an object of a given class on which a given object is based.
-
Method Details
-
getWrapped
-
getWrapped
Attempts to return an object of a given class on which a given object is based. An object is unwrapped (seeWrapper.getBase()) until an object of classclazzis found, at which point it is returned. If noclazzobject can be found,nullis returned.- Parameters:
obj- test object- Returns:
- object within the wrapping hierarchy of class
clazz, or null
-