org.apache.bcel.classfile
public final class ClassParser extends Object
Version: $Id: ClassParser.java 386056 2006-03-15 11:31:56Z tcurdt $
Field Summary | |
---|---|
int | access_flags |
Attribute[] | attributes |
static int | BUFSIZE |
int | class_name_index |
ConstantPool | constant_pool |
Field[] | fields |
DataInputStream | file |
boolean | fileOwned |
String | file_name |
int[] | interfaces |
boolean | is_zip |
int | major |
Method[] | methods |
int | minor |
int | superclass_name_index |
String | zip_file |
Constructor Summary | |
---|---|
ClassParser(InputStream file, String file_name)
Parse class from the given stream.
| |
ClassParser(String file_name) Parse class from given .class file.
| |
ClassParser(String zip_file, String file_name) Parse class from given .class file in a ZIP-archive
|
Method Summary | |
---|---|
JavaClass | parse()
Parse the given Java class file and return an object that represents
the contained data, i.e., constants, methods, fields and commands.
|
void | readAttributes()
Read information about the attributes of the class. |
void | readClassInfo()
Read information about the class and its super class. |
void | readConstantPool()
Read constant pool entries. |
void | readFields()
Read information about the fields of the class, i.e., its variables. |
void | readID()
Check whether the header of the file is ok.
|
void | readInterfaces()
Read information about the interfaces implemented by this class. |
void | readMethods()
Read information about the methods of the class. |
void | readVersion()
Read major and minor version of compiler which created the file. |
Parameters: file Input stream file_name File name
Parameters: file_name file name
Parameters: zip_file zip file name file_name file name
Returns: Class object representing the parsed class file
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException
Throws: IOException ClassFormatException