|
|||||||||
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.context.support.ContextTypeMatchClassLoader
class ContextTypeMatchClassLoader
Special variant of an overriding ClassLoader, used for temporary type
matching in AbstractApplicationContext
. Redefines classes from
a cached byte array for every loadClass
call in order to
pick up recently loaded types in the parent ClassLoader.
AbstractApplicationContext
,
ConfigurableBeanFactory.setTempClassLoader(java.lang.ClassLoader)
Nested Class Summary | |
---|---|
private class |
ContextTypeMatchClassLoader.ContextOverridingClassLoader
ClassLoader to be created for each loaded class. |
Field Summary | |
---|---|
private java.util.Map<java.lang.String,byte[]> |
bytesCache
Cache for byte array per class name |
private static java.lang.reflect.Method |
findLoadedClassMethod
|
Constructor Summary | |
---|---|
ContextTypeMatchClassLoader(java.lang.ClassLoader parent)
|
Method Summary | |
---|---|
boolean |
isClassReloadable(java.lang.Class clazz)
Determine whether the given class is reloadable (in this ClassLoader). |
java.lang.Class |
loadClass(java.lang.String name)
|
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, getResource, getResourceAsStream, getResources, 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 java.lang.reflect.Method findLoadedClassMethod
private final java.util.Map<java.lang.String,byte[]> bytesCache
Constructor Detail |
---|
public ContextTypeMatchClassLoader(java.lang.ClassLoader parent)
Method Detail |
---|
public java.lang.Class loadClass(java.lang.String name) throws java.lang.ClassNotFoundException
loadClass
in class java.lang.ClassLoader
java.lang.ClassNotFoundException
public boolean isClassReloadable(java.lang.Class clazz)
SmartClassLoader
Typically used to check whether the result may be cached (for this ClassLoader) or whether it should be reobtained every time.
isClassReloadable
in interface SmartClassLoader
clazz
- the class to check (usually loaded from this ClassLoader)
Class
object) later on
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |