public class ClassLoaderUtil
extends java.lang.Object
Constructor and Description |
---|
ClassLoaderUtil() |
Modifier and Type | Method and Description |
---|---|
static void |
cleanOpenJPACache(java.lang.ClassLoader classLoader) |
static void |
clearClassLoaderCaches()
Cleans well known class loader leaks in VMs and libraries.
|
static void |
clearSunJarFileFactoryCache(java.lang.String jarLocation) |
static void |
clearSunSoftCache(java.lang.Class clazz,
java.lang.String fieldName)
Clears the caches maintained by the SunVM object stream implementation.
|
static ClassLoaderConfigurer |
configurer(java.lang.String rawId) |
static java.net.URLClassLoader |
createClassLoader(java.lang.String appId,
java.net.URL[] urls,
java.lang.ClassLoader parent) |
static java.net.URLClassLoader |
createClassLoaderFirst(java.lang.String appId,
java.net.URL[] urls,
java.lang.ClassLoader parent) |
static java.net.URLClassLoader |
createTempClassLoader(java.lang.ClassLoader parent) |
static java.net.URLClassLoader |
createTempClassLoader(java.lang.String appId,
java.net.URL[] rawUrls,
java.lang.ClassLoader parent) |
static void |
destroyClassLoader(java.lang.ClassLoader classLoader)
Destroy a classloader as forcefully as possible.
|
static void |
destroyClassLoader(java.lang.String appId) |
static void |
destroyClassLoader(java.lang.String appId,
java.lang.String appPath) |
boolean |
finalizeNativeLibs(java.lang.ClassLoader cl) |
static java.lang.ClassLoader |
getContextClassLoader() |
static java.io.File |
getUrlCachedName(java.lang.String appId,
java.net.URL url) |
static java.net.URL |
getUrlKeyCached(java.lang.String appId,
java.io.File file) |
static boolean |
isUrlCached(java.lang.String appId,
java.net.URL url) |
static java.lang.String |
resourceName(java.lang.String s) |
public static void destroyClassLoader(java.lang.String appId, java.lang.String appPath)
public static java.lang.ClassLoader getContextClassLoader()
public static java.io.File getUrlCachedName(java.lang.String appId, java.net.URL url)
public static boolean isUrlCached(java.lang.String appId, java.net.URL url)
public static java.net.URL getUrlKeyCached(java.lang.String appId, java.io.File file)
public static java.net.URLClassLoader createClassLoaderFirst(java.lang.String appId, java.net.URL[] urls, java.lang.ClassLoader parent)
public static java.net.URLClassLoader createClassLoader(java.lang.String appId, java.net.URL[] urls, java.lang.ClassLoader parent)
public static void destroyClassLoader(java.lang.ClassLoader classLoader)
classLoader
- ClassLoader to destroy.public boolean finalizeNativeLibs(java.lang.ClassLoader cl)
public static void destroyClassLoader(java.lang.String appId)
public static java.net.URLClassLoader createTempClassLoader(java.lang.ClassLoader parent)
public static java.net.URLClassLoader createTempClassLoader(java.lang.String appId, java.net.URL[] rawUrls, java.lang.ClassLoader parent)
public static void clearClassLoaderCaches()
public static void clearSunJarFileFactoryCache(java.lang.String jarLocation)
public static void clearSunSoftCache(java.lang.Class clazz, java.lang.String fieldName)
clazz
- the name of the class containing the cache fieldfieldName
- the name of the cache fieldpublic static void cleanOpenJPACache(java.lang.ClassLoader classLoader)
public static java.lang.String resourceName(java.lang.String s)
public static ClassLoaderConfigurer configurer(java.lang.String rawId)