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 TypeMethodDescriptiongetName()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
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.
-