| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.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_PACKAGESPackages 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)Deprecated. in favor of isEligibleForShadowing(java.lang.String) | 
| 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 decorate| Method Detail | 
|---|
public void addTransformer(ClassFileTransformer transformer)
transformer - the ClassFileTransformerpublic void copyTransformers(ShadowingClassLoader other)
other - the ClassLoader to copy from
public Class<?> loadClass(String name)
                   throws ClassNotFoundException
loadClass in class ClassLoaderClassNotFoundExceptionprotected boolean isEligibleForShadowing(String className)
className - the class name to check
DecoratingClassLoader.isExcluded(java.lang.String)protected boolean isClassNameExcludedFromShadowing(String className)
isEligibleForShadowing(java.lang.String)
className - the class name to test
public URL getResource(String name)
getResource in class ClassLoaderpublic InputStream getResourceAsStream(String name)
getResourceAsStream in class ClassLoader
public Enumeration<URL> getResources(String name)
                              throws IOException
getResources in class ClassLoaderIOException| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||