|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.jboss.util.WeakClassCache
public abstract class WeakClassCache
A weak class cache that instantiates does not a hold a strong reference to either the classloader or class.
It creates the class specific data in two stages to avoid recursion.
instantiate - creates the data
generate - fills in the details
Field Summary | |
---|---|
protected Map |
cache
The cache |
Constructor Summary | |
---|---|
WeakClassCache()
|
Method Summary | |
---|---|
protected abstract void |
generate(Class clazz,
Object result)
Fill in the result |
Object |
get(Class clazz)
Get the information for a class |
Object |
get(String name,
ClassLoader cl)
Get the information for a class |
protected Map |
getClassLoaderCache(ClassLoader cl)
Get the cache for the classloader |
protected abstract Object |
instantiate(Class clazz)
Instantiate for a class |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map cache
Constructor Detail |
---|
public WeakClassCache()
Method Detail |
---|
public Object get(Class clazz)
clazz
- the class
public Object get(String name, ClassLoader cl) throws ClassNotFoundException
name
- the namecl
- the classloader
ClassNotFoundException
- when the class cannot be foundprotected abstract Object instantiate(Class clazz)
clazz
- the class
protected abstract void generate(Class clazz, Object result)
clazz
- the classthe
- resultprotected Map getClassLoaderCache(ClassLoader cl)
cl
- the classloader
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |