public final class ClassLoaders extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
clear()
Unregisters all
ClassLoaders. |
static Set<ClassLoader> |
get()
Returns a set of all explicitly registered
ClassLoaders as well as the ClassLoader that
loaded this class and the current context class loader if set. |
static boolean |
register(ClassLoader cl)
Registers a
ClassLoader. |
static Set<ClassLoader> |
registered()
Returns a set of all explicitly registered
ClassLoaders. |
static boolean |
unregister(ClassLoader cl)
Unregisters a
ClassLoader. |
public static boolean register(ClassLoader cl)
ClassLoader.
Please note that this class only keeps weak references to the ClassLoaders
you pass to avoid potential memory leaks.
cl - a ClassLoader.unregister(ClassLoader)public static boolean unregister(ClassLoader cl)
ClassLoader.cl - the ClassLoader that should be removed from the registry.register(ClassLoader)public static void clear()
ClassLoaders.register(ClassLoader),
unregister(ClassLoader)public static Set<ClassLoader> registered()
ClassLoaders.ClassLoaders in the order they have been registered.get()public static Set<ClassLoader> get()
ClassLoaders as well as the ClassLoader that
loaded this class and the current context class loader if set.ClassLoaders in the order the have been registered, followed by the ClassLoader
that loaded this class and the context ClassLoader if set.Copyright © 2012-2013. All Rights Reserved.