|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object java.lang.ClassLoader org.springframework.instrument.classloading.ShadowingClassLoader
public class ShadowingClassLoader
ClassLoader decorator that shadows an enclosing ClassLoader, applying registered transformers to all affected classes.
addTransformer(java.lang.instrument.ClassFileTransformer)
,
isClassNameExcludedFromShadowing(String)
Field Summary | |
---|---|
static String[] |
DEFAULT_EXCLUDED_PACKAGES
Packages that are excluded by default |
Constructor Summary | |
---|---|
ShadowingClassLoader(ClassLoader enclosingClassLoader)
Create a new ShadowingClassLoader, decorating the given ClassLoader. |
Method Summary | |
---|---|
void |
addTransformer(ClassFileTransformer transformer)
Add the given ClassFileTransformer to the list of transformers that this ClassLoader will apply. |
void |
copyTransformers(ShadowingClassLoader other)
Copy all ClassFileTransformers from the given ClassLoader to the list of transformers that this ClassLoader will apply. |
URL |
getResource(String name)
|
InputStream |
getResourceAsStream(String name)
|
Enumeration<URL> |
getResources(String name)
|
protected boolean |
isClassNameExcludedFromShadowing(String className)
Subclasses can override this method to specify whether or not a particular class should be excluded from shadowing. |
Class<?> |
loadClass(String name)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String[] DEFAULT_EXCLUDED_PACKAGES
Constructor Detail |
---|
public ShadowingClassLoader(ClassLoader enclosingClassLoader)
enclosingClassLoader
- the ClassLoader to decorateMethod Detail |
---|
public void addTransformer(ClassFileTransformer transformer)
transformer
- the ClassFileTransformerpublic void copyTransformers(ShadowingClassLoader other)
other
- the ClassLoader to copy frompublic Class<?> loadClass(String name) throws ClassNotFoundException
loadClass
in class ClassLoader
ClassNotFoundException
protected boolean isClassNameExcludedFromShadowing(String className)
className
- the class name to test
public URL getResource(String name)
getResource
in class ClassLoader
public InputStream getResourceAsStream(String name)
getResourceAsStream
in class ClassLoader
public Enumeration<URL> getResources(String name) throws IOException
getResources
in class ClassLoader
IOException
|
The Spring Framework | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |