Top Description Fields Constructors Methods
org.jvnet.hk2.internal

pack-priv Class DelegatingClassLoader

extends ClassLoader
Class Inheritance
Imports
java.net.URL, org.glassfish.hk2.utilities.reflection.Pretty

A classloader that delegates first to an optional parent and then to a delegate loader

Field Summary

Modifier and TypeField and Description
private final ClassLoader[]

Constructor Summary

AccessConstructor and Description
pack-priv
DelegatingClassLoader(ClassLoader
the java-style classloader parent of this loader
parent
,
ClassLoader...
other classloaders to delegate to
classLoaderDelegates
)

Constructor for special classloader to give to proxy making code

Method Summary

Modifier and TypeMethod and Description
public URL
getResource(String resource)

Overrides java.lang.ClassLoader.getResource.

Finds the resource with the given name.

public Class<?>
loadClass(String clazz)

Overrides java.lang.ClassLoader.loadClass.

Loads the class with the specified binary name.

public String
toString()

Overrides java.lang.Object.toString.

Returns a string representation of the object.

Inherited from java.lang.ClassLoader:
clearAssertionStatusdefineClassdefineClassdefineClassdefineClassdefinePackagefindClassfindClassfindLibraryfindLoadedClassfindResourcefindResourcefindResourcesfindSystemClassgetClassLoadingLockgetDefinedPackagegetDefinedPackagesgetNamegetPackagegetPackagesgetParentgetPlatformClassLoadergetResourceAsStreamgetResourcesgetSystemClassLoadergetSystemResourcegetSystemResourceAsStreamgetSystemResourcesgetUnnamedModuleisRegisteredAsParallelCapableloadClassregisterAsParallelCapableresolveClassresourcessetClassAssertionStatussetDefaultAssertionStatussetPackageAssertionStatussetSigners

Field Detail

delegatesback to summary
private final ClassLoader[] delegates

Constructor Detail

DelegatingClassLoaderback to summary
pack-priv DelegatingClassLoader(ClassLoader parent, ClassLoader... classLoaderDelegates)

Constructor for special classloader to give to proxy making code

Parameters
parent:ClassLoader

the java-style classloader parent of this loader

classLoaderDelegates:ClassLoader[]

other classloaders to delegate to

Method Detail

getResourceback to summary
public URL getResource(String resource)

Overrides java.lang.ClassLoader.getResource.

Doc from java.lang.ClassLoader.getResource.

Finds the resource with the given name. A resource is some data (images, audio, text, etc) that can be accessed by class code in a way that is independent of the location of the code.

The name of a resource is a '/'-separated path name that identifies the resource.

Resources in named modules are subject to the encapsulation rules specified by Module.getResourceAsStream. Additionally, and except for the special case where the resource has a name ending with ".class", this method will only find resources in packages of named modules when the package is opened unconditionally (even if the caller of this method is in the same module as the resource).

Annotations
@Override
loadClassback to summary
public Class<?> loadClass(String clazz) throws ClassNotFoundException

Overrides java.lang.ClassLoader.loadClass.

Doc from java.lang.ClassLoader.loadClass.

Loads the class with the specified binary name. This method searches for classes in the same manner as the loadClass(String, boolean) method. It is invoked by the Java virtual machine to resolve class references. Invoking this method is equivalent to invoking loadClass(name, false).

Annotations
@Override
Exceptions
ClassNotFoundException:
If the class was not found
toStringback to summary
public String toString()

Overrides java.lang.Object.toString.

Doc from java.lang.Object.toString.

Returns a string representation of the object. Satisfying this method's contract implies a non-null result must be returned.

Annotations
@Override