类 AbstractClassGenerator.ClassLoaderData
java.lang.Object
cn.taketoday.bytecode.core.AbstractClassGenerator.ClassLoaderData
- 封闭类:
- AbstractClassGenerator<T>
-
字段概要
字段修饰符和类型字段说明private final WeakReference<ClassLoader>Note: ClassLoaderData object is stored as a value ofWeakHashMap<ClassLoader, ...>thus this classLoader reference should be weak otherwise it would make classLoader strongly reachable and alive forever.private final LoadingCache<AbstractClassGenerator,Object, Object> AbstractClassGeneratorhere holds "cache key" (e.g.private static final Function<AbstractClassGenerator,Object> -
构造器概要
构造器 -
方法概要
修饰符和类型方法说明get(AbstractClassGenerator gen, boolean useCache) voidreserveName(String name) boolean
-
字段详细资料
-
reservedClassNames
-
generatedClasses
AbstractClassGeneratorhere holds "cache key" (e.g.Enhancerconfiguration), and the value is the generated class plus some additional values (seeAbstractClassGenerator.unwrapCachedValue(Object).The generated classes can be reused as long as their classloader is reachable.
Note: the only way to access a class is to find it through generatedClasses cache, thus the key should not expire as long as the class itself is alive (its classloader is alive).
-
classLoader
Note: ClassLoaderData object is stored as a value ofWeakHashMap<ClassLoader, ...>thus this classLoader reference should be weak otherwise it would make classLoader strongly reachable and alive forever. Reference queue is not required since the cleanup is handled byWeakHashMap. -
GET_KEY
-
-
构造器详细资料
-
ClassLoaderData
-
-
方法详细资料