|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader org.springframework.core.DecoratingClassLoader org.springframework.instrument.classloading.ShadowingClassLoader org.springframework.instrument.classloading.ResourceOverridingShadowingClassLoader
public class ResourceOverridingShadowingClassLoader
Subclass of ShadowingClassLoader that overrides attempts to locate certain files.
Field Summary | |
---|---|
private static java.util.Enumeration<java.net.URL> |
EMPTY_URL_ENUMERATION
|
private java.util.Map<java.lang.String,java.lang.String> |
overrides
Key is asked for value: value is actual value |
Fields inherited from class org.springframework.instrument.classloading.ShadowingClassLoader |
---|
DEFAULT_EXCLUDED_PACKAGES |
Constructor Summary | |
---|---|
ResourceOverridingShadowingClassLoader(java.lang.ClassLoader enclosingClassLoader)
Create a new ResourceOverridingShadowingClassLoader, decorating the given ClassLoader. |
Method Summary | |
---|---|
void |
copyOverrides(ResourceOverridingShadowingClassLoader other)
Copy all overrides from the given ClassLoader. |
java.net.URL |
getResource(java.lang.String requestedPath)
|
java.io.InputStream |
getResourceAsStream(java.lang.String requestedPath)
|
java.util.Enumeration<java.net.URL> |
getResources(java.lang.String requestedPath)
|
void |
override(java.lang.String oldPath,
java.lang.String newPath)
Return the resource (if any) at the new path on an attempt to locate a resource at the old path. |
void |
suppress(java.lang.String oldPath)
Ensure that a resource with the given path is not found. |
Methods inherited from class org.springframework.instrument.classloading.ShadowingClassLoader |
---|
addTransformer, copyTransformers, isEligibleForShadowing, loadClass |
Methods inherited from class org.springframework.core.DecoratingClassLoader |
---|
excludeClass, excludePackage, isExcluded |
Methods inherited from class java.lang.ClassLoader |
---|
clearAssertionStatus, defineClass, defineClass, defineClass, defineClass, definePackage, findClass, findLibrary, findLoadedClass, findResource, findResources, findSystemClass, getPackage, getPackages, getParent, getSystemClassLoader, getSystemResource, getSystemResourceAsStream, getSystemResources, loadClass, resolveClass, setClassAssertionStatus, setDefaultAssertionStatus, setPackageAssertionStatus, setSigners |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final java.util.Enumeration<java.net.URL> EMPTY_URL_ENUMERATION
private java.util.Map<java.lang.String,java.lang.String> overrides
Constructor Detail |
---|
public ResourceOverridingShadowingClassLoader(java.lang.ClassLoader enclosingClassLoader)
enclosingClassLoader
- the ClassLoader to decorateMethod Detail |
---|
public void override(java.lang.String oldPath, java.lang.String newPath)
oldPath
- the path requestednewPath
- the actual path to be looked uppublic void suppress(java.lang.String oldPath)
oldPath
- the path of the resource to hide even if
it exists in the parent ClassLoaderpublic void copyOverrides(ResourceOverridingShadowingClassLoader other)
other
- the other ClassLoader to copy frompublic java.net.URL getResource(java.lang.String requestedPath)
getResource
in class ShadowingClassLoader
public java.io.InputStream getResourceAsStream(java.lang.String requestedPath)
getResourceAsStream
in class ShadowingClassLoader
public java.util.Enumeration<java.net.URL> getResources(java.lang.String requestedPath) throws java.io.IOException
getResources
in class ShadowingClassLoader
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |