类 ResourceOverridingShadowingClassLoader
java.lang.Object
java.lang.ClassLoader
cn.taketoday.core.DecoratingClassLoader
cn.taketoday.instrument.ShadowingClassLoader
cn.taketoday.instrument.ResourceOverridingShadowingClassLoader
Subclass of ShadowingClassLoader that overrides attempts to
locate certain files.
- 从以下版本开始:
- 4.0
- 作者:
- Rod Johnson, Adrian Colyer
-
字段概要
从类继承的字段 cn.taketoday.instrument.ShadowingClassLoader
DEFAULT_EXCLUDED_PACKAGES -
构造器概要
构造器构造器说明ResourceOverridingShadowingClassLoader(ClassLoader enclosingClassLoader) Create a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader. -
方法概要
修饰符和类型方法说明voidCopy all overrides from the given ClassLoader.getResource(String requestedPath) getResourceAsStream(String requestedPath) getResources(String requestedPath) voidReturn the resource (if any) at the new path on an attempt to locate a resource at the old path.voidEnsure that a resource with the given path is not found.从类继承的方法 cn.taketoday.instrument.ShadowingClassLoader
addTransformer, copyTransformers, isEligibleForShadowing, loadClass从类继承的方法 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
-
构造器详细资料
-
ResourceOverridingShadowingClassLoader
Create a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader.- 参数:
enclosingClassLoader- the ClassLoader to decorate
-
-
方法详细资料
-
override
Return the resource (if any) at the new path on an attempt to locate a resource at the old path.- 参数:
oldPath- the path requestednewPath- the actual path to be looked up
-
suppress
Ensure that a resource with the given path is not found.- 参数:
oldPath- the path of the resource to hide even if it exists in the parent ClassLoader
-
copyOverrides
Copy all overrides from the given ClassLoader.- 参数:
other- the other ClassLoader to copy from
-
getResource
- 覆盖:
getResource在类中ShadowingClassLoader
-
getResourceAsStream
-
getResources
- 覆盖:
getResources在类中ShadowingClassLoader- 抛出:
IOException
-