Class JarClassFile

java.lang.Object
dxt.scanpath.v1.support.JarClassFile
All Implemented Interfaces:
ClassFile

public class JarClassFile extends Object implements ClassFile
An entry within a JAR file that can be used to read the bytecodes of a Java class.
Author:
indroneel
  • Constructor Details

    • JarClassFile

      public JarClassFile(JarFile root, JarEntry entry)
      Creates a new JAR class file entry.
      Parameters:
      root - the JAR file that contains the class file entry
      entry - the JAR entry that represents the class file
  • Method Details

    • getName

      public String getName()
      Retrieves the fully qualified name of the class whose bytecodes are contained in this file.
      Specified by:
      getName in interface ClassFile
      Returns:
      the fully qualified class name.
    • getSimpleName

      public String getSimpleName()
      Retrieves the name of the class whose bytecodes are contained in this file.
      Specified by:
      getSimpleName in interface ClassFile
      Returns:
      the class name without any package information.
    • openInputStream

      public InputStream openInputStream() throws IOException
      Gets an input stream to read bytecode contents of the class file.
      Specified by:
      openInputStream in interface ClassFile
      Returns:
      an input stream to read from.
      Throws:
      IOException - for any errors in file operations.
    • toString

      public String toString()
      Overrides:
      toString in class Object