| Modifier and Type | Field and Description |
|---|---|
| protected static final Enumeration | EMPTY_ENUMERATION
An empty enumeration, for subclasses to use if desired. |
| private static final ThreadLocal | |
| private final ConcurrentHashMap |
| Access | Constructor and Description |
|---|---|
| protected | ConcurrentClassLoader(final ConcurrentClassLoader
the parent class loader parent)Construct a new instance with the given parent class loader, which must be a concurrent class loader, or |
| protected | |
| protected | ConcurrentClassLoader(final ConcurrentClassLoader
the parent class loader parent, final String the name of this class loader, or name)null if it is unnamedConstruct a new instance with the given parent class loader, which must be a concurrent class loader, or |
| protected | ConcurrentClassLoader(String
the name of this class loader, or name)null if it is unnamedConstruct a new instance, using our class loader as the parent. |
| Modifier and Type | Method and Description |
|---|---|
| protected final Class | Returns: the classthe class name to define or load className, final byte[] the bytes to use to define the class bytes, int the offset into the byte array at which the class bytes begin off, int the number of bytes in the class len)Atomically define or load the named class. |
| protected final Class | Returns: the classthe class name to define or load className, final byte[] the bytes to use to define the class bytes, int the offset into the byte array at which the class bytes begin off, int the number of bytes in the class len, ProtectionDomain the protection domain for the defined class protectionDomain)Atomically define or load the named class. |
| protected Package | Returns: the newly defined package, or the existing one if one was already definedthe package name name, final String the specification title specTitle, final String the specification version specVersion, final String the specification vendor specVendor, final String the implementation title implTitle, final String the implementation version implVersion, final String the implementation vendor implVendor, final URL if not sealBase)null, then this package is sealed with respect to the given code source URLOverrides java. |
| protected Class | |
| protected final Class | Returns: the result offindClass(className, false, false)the class name className)Overrides java. ClassLoader#findClass(String).
|
| protected final Class | Returns: the result offindClass(className, false, false)the Java module name moduleName, final String the class name className)Overrides java. ClassLoader#findClass(String, String).
|
| protected final Package | Returns: the package ornull if no such package is defined by this class loaderthe package name name)Load a package from this class loader only. |
| protected URL | Returns: the resource URLthe resource name name, final boolean true to consider only exported resources or false to consider all resourcesFind the resource with the given name and exported status. |
| protected final URL | Returns: null alwaysignored name)Overrides java. |
| protected final URL | Returns: the resource URLjava module name moduleName, final String the resource name name)Overrides java. |
| protected InputStream | Returns: the resource stream, ornull if the resource is not foundthe resource name name, final boolean true to consider only exported resources or false to consider all resourcesFinds the resource with the given name and exported status, returning the resource content as a stream. |
| protected Enumeration | Returns: the resource enumerationthe resource name name, final boolean true to consider only exported resources or false to consider all resourcesFinds the resources with the given name and exported status. |
| protected final Enumeration | Returns: an empty enumerationignored name)Overrides java. |
| pack-priv Class | |
| pack-priv static Object | |
| protected final Package | Returns: the package, ornull if no such package is visible to this class loaderthe package name name)Overrides java. |
| protected Package | Returns: the package, ornull if no such package is visible to this class loaderthe package name name)Perform the actual work to load a package which is visible to this class loader. |
| protected Package[] | Returns: the packagesOverrides java. |
| public final URL | Returns: the resource URL, ornull if no such resource exists or the invoker does not have adequate
permission to access itthe name of the resource name)Overrides java. |
| public final InputStream | Returns: the resource stream, ornull if the resource is not foundthe resource name name)Overrides java. |
| public final Enumeration | Returns: an enumeration over all the resource URLs; if no resources could be found, the enumeration will be emptythe resource name name)Overrides java. |
| public final Class | Returns: the resultingClass instanceThe binary name of the class className)Overrides java. |
| public final Class | Returns: the resultingClass instanceThe binary name of the class className, boolean true if the class should be linked after loadingOverrides java. |
| public final Class | Returns: the classthe class name className)Same as |
| public final Class | Returns: the classthe class name className, boolean true if the class should be linked after loadingSame as |
| private Class | Returns: the class returned byfindClass(String, boolean, boolean)the class name className, boolean true to consider only exported resources or false to consider all resourcestrue to resolve the loaded classPerform a class load operation. |
| private Class |
| EMPTY_ENUMERATION | back to summary |
|---|---|
| protected static final Enumeration<URL> EMPTY_ENUMERATION An empty enumeration, for subclasses to use if desired. | |
| GET_PACKAGE_SUPPRESSOR | back to summary |
|---|---|
| private static final ThreadLocal<Boolean> GET_PACKAGE_SUPPRESSOR | |
| packages | back to summary |
|---|---|
| private final ConcurrentHashMap<String, Package> packages | |
| ConcurrentClassLoader | back to summary |
|---|---|
| protected ConcurrentClassLoader(final ConcurrentClassLoader parent) Construct a new instance with the given parent class loader, which must be a concurrent class loader, or
| |
| ConcurrentClassLoader | back to summary |
|---|---|
| protected ConcurrentClassLoader() Construct a new instance, using our class loader as the parent. | |
| ConcurrentClassLoader | back to summary |
|---|---|
| protected ConcurrentClassLoader(final ConcurrentClassLoader parent, final String name) Construct a new instance with the given parent class loader, which must be a concurrent class loader, or
| |
| ConcurrentClassLoader | back to summary |
|---|---|
| protected ConcurrentClassLoader(String name) Construct a new instance, using our class loader as the parent.
| |
| defineOrLoadClass | back to summary |
|---|---|
| protected final Class Atomically define or load the named class. If the class is already defined, the existing class is returned. | |
| defineOrLoadClass | back to summary |
|---|---|
| protected final Class Atomically define or load the named class. If the class is already defined, the existing class is returned.
| |
| definePackage | back to summary |
|---|---|
| protected Package definePackage(final String name, final String specTitle, final String specVersion, final String specVendor, final String implTitle, final String implVersion, final String implVendor, final URL sealBase) throws IllegalArgumentException Overrides java. Defines a package by name in this ConcurrentClassLoader. If the package was already defined, the existing package is returned instead.
| |
| findClass | back to summary |
|---|---|
| protected Class Find a class, possibly delegating to other loader(s). This method should never synchronize across a
delegation method call of any sort. The default implementation always throws
If a class is to be defined by this method, it should be done via one of the atomic
| |
| findClass | back to summary |
|---|---|
| protected final Class Overrides java. Implementation of
| |
| findClass | back to summary |
|---|---|
| protected final Class Overrides java. Implementation of | |
| findLoadedPackage | back to summary |
|---|---|
| protected final Package findLoadedPackage(final String name) Load a package from this class loader only. | |
| findResource | back to summary |
|---|---|
| protected URL findResource(final String name, final boolean exportsOnly) Find the resource with the given name and exported status.
| |
| findResource | back to summary |
|---|---|
| protected final URL findResource(final String name) Overrides java. Never used. | |
| findResource | back to summary |
|---|---|
| protected final URL findResource(final String moduleName, final String name) throws IOException Overrides java. Find the resource with the given name in specified java module.
| |
| findResourceAsStream | back to summary |
|---|---|
| protected InputStream findResourceAsStream(final String name, final boolean exportsOnly) Finds the resource with the given name and exported status, returning the resource content as a stream.
| |
| findResources | back to summary |
|---|---|
| protected Enumeration Finds the resources with the given name and exported status.
| |
| findResources | back to summary |
|---|---|
| protected final Enumeration Overrides java. Never used.
| |
| findSystemClassInternal | back to summary |
|---|---|
| pack-priv Class | |
| getLockForClass | back to summary |
|---|---|
| pack-priv static Object getLockForClass(ConcurrentClassLoader cl, String name) | |
| getPackage | back to summary |
|---|---|
| protected final Package getPackage(final String name) Overrides java. Load a package which is visible to this class loader. | |
| getPackageByName | back to summary |
|---|---|
| protected Package getPackageByName(final String name) Perform the actual work to load a package which is visible to this class loader. By default, uses a simple parent-first delegation strategy. | |
| getPackages | back to summary |
|---|---|
| protected Package[] getPackages() Overrides java. Get all defined packages which are visible to this class loader.
| |
| getResource | back to summary |
|---|---|
| public final URL getResource(final String name) Overrides java. Finds the resource with the given name. The name of a resource is a | |
| getResourceAsStream | back to summary |
|---|---|
| public final InputStream getResourceAsStream(final String name) Overrides java. Returns an input stream for reading the specified resource. This method delegates to
| |
| getResources | back to summary |
|---|---|
| public final Enumeration Overrides java. Finds all available resources with the given name.
| |
| loadClass | back to summary |
|---|---|
| public final Class Overrides java. Loads the class with the specified binary name. Equivalent to calling
| |
| loadClass | back to summary |
|---|---|
| public final Class Overrides java. Loads the class with the specified binary name.
| |
| loadExportedClass | back to summary |
|---|---|
| public final Class Same as
| |
| loadExportedClass | back to summary |
|---|---|
| public final Class Same as
| |
| performLoadClass | back to summary |
|---|---|
| private Class Perform a class load operation. If the class is in the package or a subpackage of a package in the system packages list,
the parent class loader is used to load the class. Otherwise, this method checks to see if the class loader
object is locked; if so, it unlocks it and submits the request to the class loader thread. Otherwise, it will
load the class itself by delegating to
| |
| performLoadClassUnchecked | back to summary |
|---|---|
| private Class | |