Class DiskClassFile

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

public class DiskClassFile extends Object implements ClassFile
A file in the local filesystem that contains the bytecodes of a Java class.
Author:
indroneel
  • Constructor Details

    • DiskClassFile

      public DiskClassFile(File root, File file)
      Creates a new instance of DiskClassFile.
      Parameters:
      root - the root directory of the classpath that contains this file.
      file - the file that contains the bytecodes of a Java class.
  • 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.