Class TypePool.Default

    • Field Detail

      • IGNORE_METHOD

        @AlwaysNull
        private static final org.objectweb.asm.MethodVisitor IGNORE_METHOD
        Indicates that a visited method should be ignored.
      • classFileLocator

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

        protected final AsmClassReader.Factory classReaderFactory
        The class reader factory to use.
    • 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.
      • Default

        public Default​(TypePool.CacheProvider cacheProvider,
                       ClassFileLocator classFileLocator,
                       TypePool.Default.ReaderMode readerMode,
                       AsmClassReader.Factory classReaderFactory)
        Creates a new default type pool that uses an explicit class reader factory.
        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.
        classReaderFactory - The class reader factory to use.
      • Default

        public Default​(TypePool.CacheProvider cacheProvider,
                       ClassFileLocator classFileLocator,
                       TypePool.Default.ReaderMode readerMode,
                       AsmClassReader.Factory classReaderFactory,
                       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.
        classReaderFactory - The class reader factory to use.
        parentPool - The parent type pool.
    • Method Detail

      • ofSystemLoader

        public static TypePool ofSystemLoader()
        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 loader.
      • ofPlatformLoader

        public static TypePool ofPlatformLoader()
        Creates a default TypePool that looks up data by querying the plaform class loader. The returned instance is configured to use a fast reading mode and a simple cache. If the current VM is of version 8 or older, the extension class loader is represented instead.
        Returns:
        A type pool that reads its data from the platform class path.
      • ofBootLoader

        public static TypePool ofBootLoader()
        Creates a default TypePool that looks up data by querying the boot 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 boot class loader.
      • of

        public static TypePool of​(@MaybeNull
                                  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.
      • doParse

        protected TypeDescription doParse​(AsmClassReader classReader)
        Parses the supplied binary representation and returns a corresponding type description.
        Parameters:
        classReader - The ASM class reader to process.
        Returns:
        An appropriate type description.