public class UrlClassLoader
extends java.lang.ClassLoader
build()
method.Modifier and Type | Class and Description |
---|---|
static class |
UrlClassLoader.Builder |
static interface |
UrlClassLoader.CachePool
An interface for a pool to store internal caches that can be shared between different class loaders,
if they contain the same URLs in their class paths.
The implementation is subject to change so one shouldn't rely on it.
|
static interface |
UrlClassLoader.CachingCondition
A condition to customize the caching policy when using
UrlClassLoader.CachePool . |
Modifier | Constructor and Description |
---|---|
|
UrlClassLoader(java.lang.ClassLoader parent)
Deprecated.
use
build() (left for compatibility with `java.system.class.loader` setting) |
protected |
UrlClassLoader(UrlClassLoader.Builder builder) |
Modifier and Type | Method and Description |
---|---|
protected java.lang.Class<?> |
_defineClass(java.lang.String name,
byte[] b) |
protected java.lang.Class<?> |
_defineClass(java.lang.String name,
byte[] b,
java.security.ProtectionDomain protectionDomain) |
protected java.lang.Class<?> |
_findClass(java.lang.String name) |
void |
addURL(java.net.URL url)
Deprecated.
adding URLs to a classloader at runtime could lead to hard-to-debug errors
|
static UrlClassLoader.Builder |
build() |
static UrlClassLoader.CachePool |
createCachePool() |
protected ClassPath |
createClassPath(UrlClassLoader.Builder builder) |
protected java.lang.Class<?> |
findClass(java.lang.String name) |
java.net.URL |
findResource(java.lang.String name) |
protected java.util.Enumeration<java.net.URL> |
findResources(java.lang.String name) |
java.util.List<java.net.URL> |
getBaseUrls()
See com.intellij.TestAll#getClassRoots()
|
protected java.lang.Object |
getClassLoadingLock(java.lang.String className) |
protected ClassPath |
getClassPath() |
java.util.Collection<java.lang.String> |
getJarAccessLog() |
java.io.InputStream |
getResourceAsStream(java.lang.String name) |
java.util.List<java.net.URL> |
getUrls() |
boolean |
hasLoadedClass(java.lang.String name) |
static java.net.URL |
internProtocol(java.net.URL url)
Interns a value of the
URL.protocol ("file" or "jar") and URL.host (empty string) fields. |
protected static void |
markParallelCapable(java.lang.Class<? extends UrlClassLoader> loaderClass) |
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findSystemClass, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
@Deprecated public UrlClassLoader(java.lang.ClassLoader parent)
build()
(left for compatibility with `java.system.class.loader` setting)protected UrlClassLoader(UrlClassLoader.Builder builder)
protected static void markParallelCapable(java.lang.Class<? extends UrlClassLoader> loaderClass)
protected ClassPath getClassPath()
public java.util.List<java.net.URL> getBaseUrls()
public java.util.Collection<java.lang.String> getJarAccessLog()
public static UrlClassLoader.Builder build()
protected final ClassPath createClassPath(UrlClassLoader.Builder builder)
public static java.net.URL internProtocol(java.net.URL url)
URL.protocol
("file" or "jar") and URL.host
(empty string) fields.@Deprecated public void addURL(java.net.URL url)
public java.util.List<java.net.URL> getUrls()
public boolean hasLoadedClass(java.lang.String name)
protected java.lang.Class<?> findClass(java.lang.String name) throws java.lang.ClassNotFoundException
findClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
protected final java.lang.Class<?> _findClass(java.lang.String name)
protected java.lang.Class<?> _defineClass(java.lang.String name, byte[] b)
protected java.lang.Class<?> _defineClass(java.lang.String name, byte[] b, java.security.ProtectionDomain protectionDomain)
public java.net.URL findResource(java.lang.String name)
findResource
in class java.lang.ClassLoader
public java.io.InputStream getResourceAsStream(java.lang.String name)
getResourceAsStream
in class java.lang.ClassLoader
protected java.util.Enumeration<java.net.URL> findResources(java.lang.String name) throws java.io.IOException
findResources
in class java.lang.ClassLoader
java.io.IOException
protected java.lang.Object getClassLoadingLock(java.lang.String className)
getClassLoadingLock
in class java.lang.ClassLoader
public static UrlClassLoader.CachePool createCachePool()