Class TypePool.Default

    • Field Detail

      • IGNORE_METHOD

        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.
    • 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

      • 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​(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.
      • parse

        private TypeDescription parse​(byte[] binaryRepresentation)
        Parses a binary representation and transforms it into a type description.
        Parameters:
        binaryRepresentation - The binary data to be parsed.
        Returns:
        A type description of the binary data.