类 AbstractClassGenerator.ClassLoaderData

java.lang.Object
cn.taketoday.bytecode.core.AbstractClassGenerator.ClassLoaderData
所有已实现的接口:
Predicate<String>
封闭类:
AbstractClassGenerator<T>

protected static class AbstractClassGenerator.ClassLoaderData extends Object implements Predicate<String>
  • 字段详细资料

    • reservedClassNames

      private final HashSet<String> reservedClassNames
    • generatedClasses

      private final LoadingCache<AbstractClassGenerator,Object,Object> generatedClasses
      AbstractClassGenerator here holds "cache key" (e.g. Enhancer configuration), and the value is the generated class plus some additional values (see AbstractClassGenerator.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

      private final WeakReference<ClassLoader> classLoader
      Note: ClassLoaderData object is stored as a value of WeakHashMap<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 by WeakHashMap.
    • GET_KEY

      private static final Function<AbstractClassGenerator,Object> GET_KEY
  • 构造器详细资料

    • ClassLoaderData

      public ClassLoaderData(ClassLoader classLoader)
  • 方法详细资料