Class TypePool.Default

    • Field Detail

      • classFileLocator

        protected final ClassFileLocator classFileLocator
        The locator to query for finding binary data of a type.
    • Constructor Detail

      • Default

        public Default​(TypePool.CacheProvider cacheProvider,
                       ClassFileLocator classFileLocator,
                       TypePool.Default.ReaderMode readerMode)
        Creates a new default type pool without a parent pool.
        Parameters:
        cacheProvider - The cache provider to be used.
        classFileLocator - The class file locator to be used.
        readerMode - The reader mode to apply by this default type pool.
      • Default

        public Default​(TypePool.CacheProvider cacheProvider,
                       ClassFileLocator classFileLocator,
                       TypePool.Default.ReaderMode readerMode,
                       TypePool parentPool)
        Creates a new default type pool.
        Parameters:
        cacheProvider - The cache provider to be used.
        classFileLocator - The class file locator to be used.
        readerMode - The reader mode to apply by this default type pool.
        parentPool - The parent type pool.
    • Method Detail

      • ofClassPath

        public static TypePool ofClassPath()
        Creates a default TypePool that looks up data by querying the system class loader. The returned instance is configured to use a fast reading mode and a simple cache.
        Returns:
        A type pool that reads its data from the system class path.
      • of

        public static TypePool of​(java.lang.ClassLoader classLoader)
        Returns a type pool for the provided class loader.
        Parameters:
        classLoader - The class loader for which this class pool is representing types.
        Returns:
        An appropriate type pool.
      • of

        public static TypePool of​(ClassFileLocator classFileLocator)
        Creates a default TypePool that looks up data by querying the supplied class file locator. The returned instance is configured to use a fast reading mode and a simple cache.
        Parameters:
        classFileLocator - The class file locator to use.
        Returns:
        A type pool that reads its data from the system class path.