| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private Attribute[] | |
| private static final int | |
| private int | |
| private ConstantPool | |
| private Field[] | |
| private DataInputStream | |
| private String | |
| private int[] | |
| private int | |
| private Method[] | |
| private int | |
| private static final int[] | |
| private int |
| Access | Constructor and Description |
|---|---|
| public | |
| public | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| public JavaClass | parse()
Parse the given Java class file and return an object that represents the contained data, i.e., constants, methods, fields and commands. |
| private final void | |
| private final void | |
| private final void | |
| private final void | |
| private final void | |
| private final void | |
| private final void | |
| private final void |
| accessflags | back to summary |
|---|---|
| private int accessflags | |
| attributes | back to summary |
|---|---|
| private Attribute[] attributes | |
| BUFSIZE | back to summary |
|---|---|
| private static final int BUFSIZE | |
| classnameIndex | back to summary |
|---|---|
| private int classnameIndex | |
| cpool | back to summary |
|---|---|
| private ConstantPool cpool | |
| fields | back to summary |
|---|---|
| private Field[] fields | |
| file | back to summary |
|---|---|
| private DataInputStream file | |
| filename | back to summary |
|---|---|
| private String filename | |
| interfaceIndices | back to summary |
|---|---|
| private int[] interfaceIndices | |
| major | back to summary |
|---|---|
| private int major | |
| methods | back to summary |
|---|---|
| private Method[] methods | |
| minor | back to summary |
|---|---|
| private int minor | |
| NO_INTERFACES | back to summary |
|---|---|
| private static final int[] NO_INTERFACES | |
| superclassnameIndex | back to summary |
|---|---|
| private int superclassnameIndex | |
| ClassParser | back to summary |
|---|---|
| public ClassParser(InputStream file, String filename) Parse class from the given stream | |
| ClassParser | back to summary |
|---|---|
| public ClassParser(ByteArrayInputStream baos, String filename) | |
| ClassParser | back to summary |
|---|---|
| public ClassParser(String file_name) throws IOException Parse class from given .class file | |
| parse | back to summary |
|---|---|
| public JavaClass parse() throws IOException, ClassFormatException 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). | |
| readAttributes | back to summary |
|---|---|
| private final void readAttributes() Read information about the attributes of the class | |
| readClassInfo | back to summary |
|---|---|
| private final void readClassInfo() throws IOException Read information about the class and its super class | |
| readConstantPool | back to summary |
|---|---|
| private final void readConstantPool() throws IOException | |
| readFields | back to summary |
|---|---|
| private final void readFields() throws IOException, ClassFormatException Read information about the fields of the class | |
| readID | back to summary |
|---|---|
| private final void readID() throws IOException Check whether the header of the file is ok. Of course, this has to be the first action on successive file reads | |
| readInterfaces | back to summary |
|---|---|
| private final void readInterfaces() throws IOException Read information about the interfaces implemented by this class | |
| readMethods | back to summary |
|---|---|
| private final void readMethods() throws IOException Read information about the methods of the class | |
| readVersion | back to summary |
|---|---|
| private final void readVersion() throws IOException Read major and minor version of compiler which created the file | |