Top Description Fields Constructors Methods
org.hibernate.bytecode.spi

public Class InstrumentedClassLoader

extends ClassLoader
Class Inheritance
Imports
java.io.InputStream

A specialized ClassLoader which performs bytecode enhancement on class definitions as they are loaded into the ClassLoader scope.
Authors
Emmanuel Bernard, Steve Ebersole

Field Summary

Modifier and TypeField and Description
private final ClassTransformer

Constructor Summary

AccessConstructor and Description
public
InstrumentedClassLoader(ClassLoader
The parent ClassLoader
parent
,
ClassTransformer
The transformer to use for applying enhancement
classTransformer
)

Constructs an InstrumentedClassLoader.

Method Summary

Modifier and TypeMethod and Description
public Class<T>
loadClass(String
The binary name of the class
name
)

Overrides java.lang.ClassLoader.loadClass.

Loads the class with the specified binary name.
Inherited from java.lang.ClassLoader:
clearAssertionStatusdefineClassdefineClassdefineClassdefineClassdefinePackagefindClassfindClassfindLibraryfindLoadedClassfindResourcefindResourcefindResourcesfindSystemClassgetClassLoadingLockgetDefinedPackagegetDefinedPackagesgetNamegetPackagegetPackagesgetParentgetPlatformClassLoadergetResourcegetResourceAsStreamgetResourcesgetSystemClassLoadergetSystemResourcegetSystemResourceAsStreamgetSystemResourcesgetUnnamedModuleisRegisteredAsParallelCapableloadClassregisterAsParallelCapableresolveClassresourcessetClassAssertionStatussetDefaultAssertionStatussetPackageAssertionStatussetSigners

Field Detail

classTransformerback to summary
private final ClassTransformer classTransformer

Constructor Detail

InstrumentedClassLoaderback to summary
public InstrumentedClassLoader(ClassLoader parent, ClassTransformer classTransformer)

Constructs an InstrumentedClassLoader.

Parameters
parent:ClassLoader

The parent ClassLoader

classTransformer:ClassTransformer

The transformer to use for applying enhancement

Method Detail

loadClassback to summary
public Class<T> loadClass(String name) 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).

Parameters
name:String

The binary name of the class

Returns:Class<T>

The resulting Class object

Annotations
@Override
Exceptions
ClassNotFoundException:
If the class was not found