public abstract class

DecoratingClassLoader

extends ClassLoader
java.lang.Object
   ↳ java.lang.ClassLoader
     ↳ org.springframework.core.DecoratingClassLoader
Known Direct Subclasses
Known Indirect Subclasses

Class Overview

Base class for decorating ClassLoaders such as OverridingClassLoader and ShadowingClassLoader, providing common handling of excluded packages and classes.

Summary

Public Constructors
DecoratingClassLoader()
Create a new DecoratingClassLoader with no parent ClassLoader.
DecoratingClassLoader(ClassLoader parent)
Create a new DecoratingClassLoader using the given parent ClassLoader for delegation.
Public Methods
void excludeClass(String className)
Add a class name to exclude from decoration (e.g.
void excludePackage(String packageName)
Add a package name to exclude from decoration (e.g.
Protected Methods
boolean isExcluded(String className)
Determine whether the specified class is excluded from decoration by this class loader.
[Expand]
Inherited Methods
From class java.lang.ClassLoader
From class java.lang.Object

Public Constructors

public DecoratingClassLoader ()

Also: SpringCore

Create a new DecoratingClassLoader with no parent ClassLoader.

public DecoratingClassLoader (ClassLoader parent)

Also: SpringCore

Create a new DecoratingClassLoader using the given parent ClassLoader for delegation.

Public Methods

public void excludeClass (String className)

Also: SpringCore

Add a class name to exclude from decoration (e.g. overriding).

Any class name registered here will be handled by the parent ClassLoader in the usual fashion.

Parameters
className the class name to exclude

public void excludePackage (String packageName)

Also: SpringCore

Add a package name to exclude from decoration (e.g. overriding).

Any class whose fully-qualified name starts with the name registered here will be handled by the parent ClassLoader in the usual fashion.

Parameters
packageName the package name to exclude

Protected Methods

protected boolean isExcluded (String className)

Also: SpringCore

Determine whether the specified class is excluded from decoration by this class loader.

The default implementation checks against excluded packages and classes.

Parameters
className the class name to check
Returns
  • whether the specified class is eligible