|
|||||||||
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
public class ShadowingClassLoader
ClassLoader decorator that shadows an enclosing ClassLoader, applying registered transformers to all affected classes.
addTransformer(java.lang.instrument.ClassFileTransformer)
,
OverridingClassLoader
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 |
isEligibleForShadowing(String className)
Determine whether the specified class is eligible for shadowing by this class loader. |
Class<?> |
loadClass(String name)
|
Methods inherited from class org.springframework.core.DecoratingClassLoader |
---|
excludeClass, excludePackage, isExcluded |
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 isEligibleForShadowing(String className)
className
- the class name to check
DecoratingClassLoader.isExcluded(java.lang.String)
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
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |