Top Fields Constructors Methods
org.hibernate.boot.registry.classloading.internal

public Class AggregatedClassLoader

extends ClassLoader
Class Inheritance
Imports
java.io.IOException, java.net.URL, java.util.Enumeration, .Iterator, .LinkedHashSet

Field Summary

Modifier and TypeField and Description
private final ClassLoader[]
private final TcclLookupPrecedence

Constructor Summary

AccessConstructor and Description
public
AggregatedClassLoader(final LinkedHashSet<ClassLoader> orderedClassLoaderSet, TcclLookupPrecedence precedence)

Method Summary

Modifier and TypeMethod and Description
protected Class<?>
findClass(String
The binary name of the class
name
)

Overrides java.lang.ClassLoader.findClass.

Finds the class with the specified binary name.
protected URL
findResource(String
The resource name
name
)

Overrides java.lang.ClassLoader.findResource.

Finds the resource with the given name.
public Enumeration<URL>
getResources(String
The resource name
name
)

Overrides java.lang.ClassLoader.getResources.

Finds all the resources with the given name.
private static ClassLoader
private static ClassLoader
pack-priv Iterator<ClassLoader>
private Iterator<ClassLoader>
newTcclAfterIterator(final ClassLoader threadContextClassLoader)

private Iterator<ClassLoader>
newTcclBeforeIterator(final ClassLoader threadContextClassLoader)

private Iterator<ClassLoader>
Inherited from java.lang.ClassLoader:
clearAssertionStatusdefineClassdefineClassdefineClassdefineClassdefinePackagefindClassfindLibraryfindLoadedClassfindResourcefindResourcesfindSystemClassgetClassLoadingLockgetDefinedPackagegetDefinedPackagesgetNamegetPackagegetPackagesgetParentgetPlatformClassLoadergetResourcegetResourceAsStreamgetSystemClassLoadergetSystemResourcegetSystemResourceAsStreamgetSystemResourcesgetUnnamedModuleisRegisteredAsParallelCapableloadClassloadClassregisterAsParallelCapableresolveClassresourcessetClassAssertionStatussetDefaultAssertionStatussetPackageAssertionStatussetSigners

Field Detail

individualClassLoadersback to summary
private final ClassLoader[] individualClassLoaders
tcclLookupPrecedenceback to summary
private final TcclLookupPrecedence tcclLookupPrecedence

Constructor Detail

AggregatedClassLoaderback to summary
public AggregatedClassLoader(final LinkedHashSet<ClassLoader> orderedClassLoaderSet, TcclLookupPrecedence precedence)

Method Detail

findClassback to summary
protected Class<?> findClass(String name) throws ClassNotFoundException

Overrides java.lang.ClassLoader.findClass.

Doc from java.lang.ClassLoader.findClass.

Finds the class with the specified binary name. This method should be overridden by class loader implementations that follow the delegation model for loading classes, and will be invoked by the loadClass method after checking the parent class loader for the requested class.

Parameters
name:String

The binary name of the class

Returns:Class<?>

The resulting Class object

Annotations
@Override
Exceptions
ClassNotFoundException:
If the class could not be found
findResourceback to summary
protected URL findResource(String name)

Overrides java.lang.ClassLoader.findResource.

Doc from java.lang.ClassLoader.findResource.

Finds the resource with the given name. Class loader implementations should override this method.

For resources in named modules then the method must implement the rules for encapsulation specified in the Module getResourceAsStream method. Additionally, it must not find non-".class" resources in packages of named modules unless the package is opened unconditionally.

Parameters
name:String

The resource name

Returns:URL

URL object for reading the resource; null if the resource could not be found, a URL could not be constructed to locate the resource, the resource is in a package that is not opened unconditionally, or access to the resource is denied by the security manager.

Annotations
@Override
getResourcesback to summary
public Enumeration<URL> getResources(String name) throws IOException

Overrides java.lang.ClassLoader.getResources.

Doc from java.lang.ClassLoader.getResources.

Finds all the resources 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).

Parameters
name:String

The resource name

Returns:Enumeration<URL>

An enumeration of URL objects for the resource. If no resources could be found, the enumeration will be empty. Resources for which a URL cannot be constructed, are in a package that is not opened unconditionally, or access to the resource is denied by the security manager, are not returned in the enumeration.

Annotations
@Override
Exceptions
IOException:
If I/O errors occur
locateSystemClassLoaderback to summary
private static ClassLoader locateSystemClassLoader()
locateTCCLback to summary
private static ClassLoader locateTCCL()
newClassLoaderIteratorback to summary
pack-priv Iterator<ClassLoader> newClassLoaderIterator()
newTcclAfterIteratorback to summary
private Iterator<ClassLoader> newTcclAfterIterator(final ClassLoader threadContextClassLoader)
newTcclBeforeIteratorback to summary
private Iterator<ClassLoader> newTcclBeforeIterator(final ClassLoader threadContextClassLoader)
newTcclNeverIteratorback to summary
private Iterator<ClassLoader> newTcclNeverIterator()