类 DecoratingClassLoader
- java.lang.Object
- java.lang.ClassLoader
- org.springframework.core.DecoratingClassLoader
@UsesJava7 public abstract class DecoratingClassLoader extends ClassLoader
Base class for decorating ClassLoaders such asOverridingClassLoader
andShadowingClassLoader
, providing common handling of excluded packages and classes.- 从以下版本开始:
- 2.5.2
- 作者:
- Juergen Hoeller, Rod Johnson
字段概要
字段 修饰符和类型 字段 说明 protected static boolean
parallelCapableClassLoaderAvailable
Java 7+ClassLoader.registerAsParallelCapable()
available?
构造器概要
构造器 构造器 说明 DecoratingClassLoader()
Create a new DecoratingClassLoader with no parent ClassLoader.DecoratingClassLoader(ClassLoader parent)
Create a new DecoratingClassLoader using the given parent ClassLoader for delegation.
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 void
excludeClass(String className)
Add a class name to exclude from decoration (e.g. overriding).void
excludePackage(String packageName)
Add a package name to exclude from decoration (e.g. overriding).protected boolean
isExcluded(String className)
Determine whether the specified class is excluded from decoration by this class loader.从类继承的方法 java.lang.ClassLoader
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findClass, findLibrary, findLoadedClass, findResource, findResource, findResources, findSystemClass, getClassLoadingLock, getDefinedPackage, getDefinedPackages, getName, getPackage, getPackages, getParent, getPlatformClassLoader, getResource, getResourceAsStream, getResources, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
字段详细资料
parallelCapableClassLoaderAvailable
protected static final boolean parallelCapableClassLoaderAvailable
Java 7+ClassLoader.registerAsParallelCapable()
available?- 从以下版本开始:
- 4.1.2
构造器详细资料
DecoratingClassLoader
public DecoratingClassLoader()
Create a new DecoratingClassLoader with no parent ClassLoader.
DecoratingClassLoader
public DecoratingClassLoader(ClassLoader parent)
Create a new DecoratingClassLoader using the given parent ClassLoader for delegation.
方法详细资料
excludePackage
public void excludePackage(String packageName)
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.
- 参数:
packageName
- the package name to exclude
excludeClass
public void excludeClass(String className)
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.
- 参数:
className
- the class name to exclude
isExcluded
protected boolean isExcluded(String className)
Determine whether the specified class is excluded from decoration by this class loader.The default implementation checks against excluded packages and classes.
- 参数:
className
- the class name to check- 返回:
- whether the specified class is eligible
- 另请参阅:
excludePackage(java.lang.String)
,excludeClass(java.lang.String)