类 ShadowingClassLoader
java.lang.Object
java.lang.ClassLoader
cn.taketoday.core.DecoratingClassLoader
cn.taketoday.instrument.ShadowingClassLoader
public class ShadowingClassLoader
extends cn.taketoday.core.DecoratingClassLoader
ClassLoader decorator that shadows an enclosing ClassLoader,
applying registered transformers to all affected classes.
- 从以下版本开始:
- 4.0
- 作者:
- Rob Harrop, Juergen Hoeller, Costin Leau
- 另请参阅:
-
addTransformer(java.lang.instrument.ClassFileTransformer)OverridingClassLoader
-
字段概要
字段 -
构造器概要
构造器构造器说明ShadowingClassLoader(ClassLoader enclosingClassLoader) Create a new ShadowingClassLoader, decorating the given ClassLoader, applyingDEFAULT_EXCLUDED_PACKAGES.ShadowingClassLoader(ClassLoader enclosingClassLoader, boolean defaultExcludes) Create a new ShadowingClassLoader, decorating the given ClassLoader. -
方法概要
修饰符和类型方法说明voidaddTransformer(ClassFileTransformer transformer) Add the given ClassFileTransformer to the list of transformers that this ClassLoader will apply.voidCopy all ClassFileTransformers from the given ClassLoader to the list of transformers that this ClassLoader will apply.getResource(String name) getResourceAsStream(String name) getResources(String name) protected booleanisEligibleForShadowing(String className) Determine whether the specified class is eligible for shadowing by this class loader.Class<?>从类继承的方法 cn.taketoday.core.DecoratingClassLoader
excludeClass, excludePackage, isExcluded从类继承的方法 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, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, getUnnamedModule, isRegisteredAsParallelCapable, loadClass, registerAsParallelCapable, resolveClass, resources, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners
-
字段详细资料
-
DEFAULT_EXCLUDED_PACKAGES
Packages that are excluded by default.
-
-
构造器详细资料
-
ShadowingClassLoader
Create a new ShadowingClassLoader, decorating the given ClassLoader, applyingDEFAULT_EXCLUDED_PACKAGES.- 参数:
enclosingClassLoader- the ClassLoader to decorate- 另请参阅:
-
ShadowingClassLoader
Create a new ShadowingClassLoader, decorating the given ClassLoader.- 参数:
enclosingClassLoader- the ClassLoader to decoratedefaultExcludes- whether to applyDEFAULT_EXCLUDED_PACKAGES
-
-
方法详细资料
-
addTransformer
Add the given ClassFileTransformer to the list of transformers that this ClassLoader will apply.- 参数:
transformer- the ClassFileTransformer
-
copyTransformers
Copy all ClassFileTransformers from the given ClassLoader to the list of transformers that this ClassLoader will apply.- 参数:
other- the ClassLoader to copy from
-
loadClass
- 覆盖:
loadClass在类中ClassLoader- 抛出:
ClassNotFoundException
-
isEligibleForShadowing
Determine whether the specified class is eligible for shadowing by this class loader.- 参数:
className- the class name to check- 返回:
- whether the specified class is eligible
- 另请参阅:
-
DecoratingClassLoader.isExcluded(java.lang.String)
-
getResource
- 覆盖:
getResource在类中ClassLoader
-
getResourceAsStream
- 覆盖:
getResourceAsStream在类中ClassLoader
-
getResources
- 覆盖:
getResources在类中ClassLoader- 抛出:
IOException
-