Class JarArchive

java.lang.Object
org.glassfish.hk2.classmodel.reflect.util.AbstractAdapter
org.glassfish.hk2.classmodel.reflect.util.JarArchive
All Implemented Interfaces:
Closeable, AutoCloseable, ArchiveAdapter

public class JarArchive extends AbstractAdapter
Jar based archive abstraction
  • Field Details

    • parser

      private final Parser parser
    • jar

      private final JarFile jar
    • uri

      private final URI uri
    • releaseCount

      private final AtomicInteger releaseCount
      We need to maintain how many internal jars got opened so that we don't close our jar archive until all the sub scanning has been done successfully.
  • Constructor Details

  • Method Details

    • getURI

      public URI getURI()
      Description copied from interface: ArchiveAdapter
      Returns the URI of the archive
      Returns:
      URI of the archive
    • onSelectedEntries

      public void onSelectedEntries(ArchiveAdapter.Selector selector, ArchiveAdapter.EntryTask task, Logger logger) throws IOException
      Description copied from interface: ArchiveAdapter
      perform a task on selected archive entries
      Parameters:
      selector - implementation to select the archive archive entries on which the task should be performed.
      task - the task to perform
      logger - for any logging activity
      Throws:
      IOException - can be generated while reading the archive entries
    • getManifest

      public Manifest getManifest() throws IOException
      Description copied from interface: ArchiveAdapter
      Returns the manifest instance for the archive.
      Returns:
      the archive's manifest
      Throws:
      IOException - if the manifest cannot be loaded.
    • close

      public void close() throws IOException
      Throws:
      IOException
    • releaseCount

      void releaseCount() throws IOException
      Throws:
      IOException