Class ResourceOverridingShadowingClassLoader
java.lang.Object
java.lang.ClassLoader
org.springframework.core.DecoratingClassLoader
org.springframework.instrument.classloading.ShadowingClassLoader
org.springframework.instrument.classloading.ResourceOverridingShadowingClassLoader
Subclass of ShadowingClassLoader that overrides attempts to
 locate certain files.
- Since:
- 2.0
- Author:
- Rod Johnson, Adrian Colyer
- 
Field SummaryFields inherited from class org.springframework.instrument.classloading.ShadowingClassLoaderDEFAULT_EXCLUDED_PACKAGES
- 
Constructor SummaryConstructorsConstructorDescriptionResourceOverridingShadowingClassLoader(ClassLoader enclosingClassLoader) Create a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader.
- 
Method SummaryModifier and TypeMethodDescriptionvoidCopy 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.Methods inherited from class org.springframework.instrument.classloading.ShadowingClassLoaderaddTransformer, copyTransformers, isEligibleForShadowing, loadClassMethods inherited from class org.springframework.core.DecoratingClassLoaderexcludeClass, excludePackage, isExcludedMethods inherited from class java.lang.ClassLoaderclearAssertionStatus, 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
- 
Constructor Details- 
ResourceOverridingShadowingClassLoaderCreate a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader.- Parameters:
- enclosingClassLoader- the ClassLoader to decorate
 
 
- 
- 
Method Details- 
overrideReturn the resource (if any) at the new path on an attempt to locate a resource at the old path.- Parameters:
- oldPath- the path requested
- newPath- the actual path to be looked up
 
- 
suppressEnsure that a resource with the given path is not found.- Parameters:
- oldPath- the path of the resource to hide even if it exists in the parent ClassLoader
 
- 
copyOverridesCopy all overrides from the given ClassLoader.- Parameters:
- other- the other ClassLoader to copy from
 
- 
getResource- Overrides:
- getResourcein class- ShadowingClassLoader
 
- 
getResourceAsStream- Overrides:
- getResourceAsStreamin class- ShadowingClassLoader
 
- 
getResources- Overrides:
- getResourcesin class- ShadowingClassLoader
- Throws:
- IOException
 
 
-