| Modifier and Type | Field and Description |
|---|---|
| private int | |
| private static final int | |
| private String | |
| private ConstantPool | |
| private final DataInput | |
| private String[] | |
| private static final String[] | |
| private Annotations | |
| private List | |
| private String |
| Access | Constructor and Description |
|---|---|
| public |
| Modifier and Type | Method and Description |
|---|---|
| public JavaClass | Returns: Class object representing the parsed class fileParses the given Java class file and return an object that represents the contained data, i.e., constants, methods, fields and commands. |
| private void | readAttributes(boolean
false if processing a class fieldOrMethod)Reads information about the attributes of the class. |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void | |
| private void |
| accessFlags | back to summary |
|---|---|
| private int accessFlags | |
| BUFSIZE | back to summary |
|---|---|
| private static final int BUFSIZE | |
| className | back to summary |
|---|---|
| private String className | |
| constantPool | back to summary |
|---|---|
| private ConstantPool constantPool | |
| dataInputStream | back to summary |
|---|---|
| private final DataInput dataInputStream | |
| interfaceNames | back to summary |
|---|---|
| private String[] interfaceNames | |
| INTERFACES_EMPTY_ARRAY | back to summary |
|---|---|
| private static final String[] INTERFACES_EMPTY_ARRAY | |
| runtimeVisibleAnnotations | back to summary |
|---|---|
| private Annotations runtimeVisibleAnnotations | |
| runtimeVisibleFieldOrMethodAnnotations | back to summary |
|---|---|
| private List<Annotations> runtimeVisibleFieldOrMethodAnnotations | |
| superclassName | back to summary |
|---|---|
| private String superclassName | |
| ClassParser | back to summary |
|---|---|
| public ClassParser(final InputStream inputStream) Parses class from the given stream.
| |
| parse | back to summary |
|---|---|
| public JavaClass parse() throws IOException, ClassFormatException Parses 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 void readAttributes(boolean fieldOrMethod) throws IOException, ClassFormatException Reads information about the attributes of the class.
| |
| readClassInfo | back to summary |
|---|---|
| private void readClassInfo() throws IOException, ClassFormatException Reads information about the class and its super class.
| |
| readConstantPool | back to summary |
|---|---|
| private void readConstantPool() throws IOException, ClassFormatException Reads constant pool entries.
| |
| readFields | back to summary |
|---|---|
| private void readFields() throws IOException, ClassFormatException Reads information about the fields of the class, i.e., its variables.
| |
| readID | back to summary |
|---|---|
| private void readID() throws IOException, ClassFormatException Checks 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 void readInterfaces() throws IOException, ClassFormatException Reads information about the interfaces implemented by this class.
| |
| readMethods | back to summary |
|---|---|
| private void readMethods() throws IOException, ClassFormatException Reads information about the methods of the class.
| |
| readVersion | back to summary |
|---|---|
| private void readVersion() throws IOException, ClassFormatException Reads major and minor version of compiler which created the file.
| |