@ThreadSafe public final class ClassHierarchyCache extends Object
| Modifier and Type | Method and Description |
|---|---|
static EChange |
clearCache()
It's important to clear the cache upon application shutdown, because for
web applications, keeping a cache of classes may prevent the web
application from unloading
|
static ICommonsSet<Class<?>> |
getClassHierarchy(Class<?> aClass)
Get the complete super class hierarchy of the passed class including all
super classes and all interfaces of the passed class and of all parent
classes.
|
static ICommonsIterable<WeakReference<Class<?>>> |
getClassHierarchyIterator(Class<?> aClass)
Iterate the complete super class hierarchy of the passed class including
all super classes and all interfaces of the passed class and of all parent
classes.
|
static ICommonsList<Class<?>> |
getClassHierarchyList(Class<?> aClass)
Get the complete super class hierarchy of the passed class including all
super classes and all interfaces of the passed class and of all parent
classes.
|
@Nonnull public static EChange clearCache()
EChange@Nonnull @ReturnsMutableCopy public static ICommonsSet<Class<?>> getClassHierarchy(@Nonnull Class<?> aClass)
aClass - The source class to get the hierarchy from.null and non-empty Set containing the passed
class and all super classes, and all super-interfaces.@Nonnull @ReturnsMutableCopy public static ICommonsList<Class<?>> getClassHierarchyList(@Nonnull Class<?> aClass)
aClass - The source class to get the hierarchy from.null and non-empty list containing the passed
class and all super classes, and all super-interfaces. Duplicates
were already removed.@Nonnull public static ICommonsIterable<WeakReference<Class<?>>> getClassHierarchyIterator(@Nonnull Class<?> aClass)
aClass - The source class to get the hierarchy from.null and non-empty list containing the passed
class and all super classes, and all super-interfaces. Duplicates
were already removed.Copyright © 2014–2022 Philip Helger. All rights reserved.