public class DecoratorUtils extends Object
| Constructor and Description |
|---|
DecoratorUtils() |
| Modifier and Type | Method and Description |
|---|---|
static List<Object> |
getDecoratorLineage(Object obj)
Finds the decorator lineage of the given object.
|
static Object |
resolveUnderlyingObject(Object obj)
Resolves the truly underlying object in a possible chain of
Decorator. |
public static Object resolveUnderlyingObject(Object obj)
Decorator.obj - object to resolve.public static List<Object> getDecoratorLineage(Object obj)
If object is not a Decorator, this method will return a singleton list with just the object.
If object is a Decorator, it will return a list of the underlying object followed by the
decorator lineage up to the input decorator object.
obj - an object.