Top Description Fields Constructors Methods
org.easymock.internal

pack-priv Class LinkedClassLoader

extends ClassLoader
Class Inheritance
Imports
java.util.Arrays, .List

ClassLoader looking in multiple ClassLoaders in order to find the wanted class. Useful when in an OSGi context where class loaders are organized as a graph.

Field Summary

Modifier and TypeField and Description
private final List<ClassLoader>

Constructor Summary

AccessConstructor and Description
public
LinkedClassLoader(ClassLoader... classLoaders)

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.
Inherited from java.lang.ClassLoader:
clearAssertionStatusdefineClassdefineClassdefineClassdefineClassdefinePackagefindClassfindLibraryfindLoadedClassfindResourcefindResourcefindResourcesfindSystemClassgetClassLoadingLockgetDefinedPackagegetDefinedPackagesgetNamegetPackagegetPackagesgetParentgetPlatformClassLoadergetResourcegetResourceAsStreamgetResourcesgetSystemClassLoadergetSystemResourcegetSystemResourceAsStreamgetSystemResourcesgetUnnamedModuleisRegisteredAsParallelCapableloadClassloadClassregisterAsParallelCapableresolveClassresourcessetClassAssertionStatussetDefaultAssertionStatussetPackageAssertionStatussetSigners

Field Detail

classLoadersback to summary
private final List<ClassLoader> classLoaders

Constructor Detail

LinkedClassLoaderback to summary
public LinkedClassLoader(ClassLoader... classLoaders)

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