Class ClassParser
java.lang.Object
org.aspectj.apache.bcel.classfile.ClassParser
Wrapper class that parses a given Java .class file. The method parse returns a
JavaClass object on success. When an I/O error or an
inconsistency occurs an appropiate exception is propagated back to
the caller.
The structure and the names comply, except for a few conveniences,
exactly with the
JVM specification 1.0. See this paper for
further details about the structure of a bytecode file.
- Version:
- $Id: ClassParser.java,v 1.6 2008/05/30 17:29:14 aclement Exp $
- Author:
- M. Dahm
-
Constructor Summary
ConstructorsConstructorDescriptionClassParser
(ByteArrayInputStream baos, String filename) ClassParser
(InputStream file, String filename) Parse class from the given streamClassParser
(String file_name) Parse class from given .class file -
Method Summary
-
Constructor Details
-
ClassParser
Parse class from the given stream -
ClassParser
-
ClassParser
Parse class from given .class file- Throws:
IOException
-
-
Method Details
-
parse
Parse the given Java class file and return an object that represents the contained data, i.e., constants, methods, fields and commands. A ClassFormatException is raised, if the file is not a valid .class file. (This does not include verification of the byte code as it is performed by the java interpreter).- Throws:
IOException
ClassFormatException
-