Class Plugin.Engine.Source.Origin.ForJarFile

    • Field Detail

      • file

        private final java.util.jar.JarFile file
        The represented file.
    • Constructor Detail

      • ForJarFile

        public ForJarFile​(java.util.jar.JarFile file)
        Creates a new origin for a jar file.
        Parameters:
        file - The represented file.
    • Method Detail

      • getManifest

        public java.util.jar.Manifest getManifest()
                                           throws java.io.IOException
        Returns the manifest file of the source location or null if no manifest exists.
        Specified by:
        getManifest in interface Plugin.Engine.Source.Origin
        Returns:
        This source's manifest or null.
        Throws:
        java.io.IOException - If an I/O error occurs.
      • getClassFileLocator

        public ClassFileLocator getClassFileLocator()
        Returns a class file locator for the represented source. If the class file locator needs to be closed, it is the responsibility of this origin to close the locator or its underlying resources.
        Specified by:
        getClassFileLocator in interface Plugin.Engine.Source.Origin
        Returns:
        A class file locator for locating class files of this instance..
      • close

        public void close()
                   throws java.io.IOException
        Specified by:
        close in interface java.lang.AutoCloseable
        Specified by:
        close in interface java.io.Closeable
        Throws:
        java.io.IOException