Interface ClassFile

All Known Implementing Classes:
DiskClassFile, JarClassFile, ZipClassFile

public interface ClassFile
Abstracts out a file that contains bytecodes of a Java class.
Author:
indroneel
  • Method Summary

    Modifier and Type
    Method
    Description
    Retrieves the fully qualified name of the class whose bytecodes are contained in this file.
    Retrieves the name of the class whose bytecodes are contained in this file.
    Gets an input stream to read bytecode contents of the class file.
  • Method Details

    • getName

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

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

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