| java.lang.Object | |||
| ↳ | java.lang.ClassLoader | ||
| ↳ | org.springframework.core.DecoratingClassLoader | ||
| ↳ | org.springframework.core.OverridingClassLoader | ||
Known Direct Subclasses
|
ClassLoader that does not always delegate to the
parent loader, as normal class loaders do. This enables, for example,
instrumentation to be forced in the overriding ClassLoader, or a
"throwaway" class loading behavior, where selected classes are
temporarily loaded in the overriding ClassLoader, in order to load
an instrumented version of the class in the parent ClassLoader later on.
| Fields | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| DEFAULT_EXCLUDED_PACKAGES | Packages that are excluded by default | ||||||||||
| Public Constructors | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Create a new OverridingClassLoader for the given class loader.
| |||||||||||
| Protected Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
Determine whether the specified class is eligible for overriding
by this class loader.
| |||||||||||
Load the defining bytes for the given class,
to be turned into a Class object through a
defineClass(byte[], int, int) call. | |||||||||||
Load the specified class for overriding purposes in this ClassLoader.
| |||||||||||
Open an InputStream for the specified class.
| |||||||||||
Transformation hook to be implemented by subclasses.
| |||||||||||
|
[Expand]
Inherited Methods | |||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
From class
org.springframework.core.DecoratingClassLoader
| |||||||||||
From class
java.lang.ClassLoader
| |||||||||||
From class
java.lang.Object
| |||||||||||
Packages that are excluded by default
Create a new OverridingClassLoader for the given class loader.
| parent | the ClassLoader to build an overriding ClassLoader for |
|---|
Determine whether the specified class is eligible for overriding by this class loader.
| className | the class name to check |
|---|
Load the defining bytes for the given class,
to be turned into a Class object through a defineClass(byte[], int, int) call.
The default implementation delegates to openStreamForClass(String)
and transformIfNecessary(String, byte[]).
| name | the name of the class |
|---|
null if no class defined for that name| ClassNotFoundException | if the class for the given name couldn't be loaded |
|---|
Load the specified class for overriding purposes in this ClassLoader.
The default implementation delegates to findLoadedClass(String),
loadBytesForClass(String) and defineClass(byte[], int, int).
| name | the name of the class |
|---|
null if no class defined for that name| ClassNotFoundException | if the class for the given name couldn't be loaded |
|---|
Open an InputStream for the specified class.
The default implementation loads a standard class file through
the parent ClassLoader's getResourceAsStream method.
| name | the name of the class |
|---|
Transformation hook to be implemented by subclasses.
The default implementation simply returns the given bytes as-is.
| name | the fully-qualified name of the class being transformed |
|---|---|
| bytes | the raw bytes of the class |
null;
same as the input bytes if the transformation produced no changes)