Attribute, CodeException, LineNumberTable, LocalVariableTable
| Modifier and Type | Field and Description |
|---|---|
| private Attribute[] | |
| private byte[] | |
| private CodeException[] | |
| private int | |
| private int | |
| private static final CodeException[] |
| Access | Constructor and Description |
|---|---|
| public | |
| pack-priv | |
| public | Code(int
Index pointing to the name Code name_index, int Content length in bytes length, int Maximum size of stack max_stack, int Number of local variables max_locals, byte[] Actual byte code code, CodeException[] Table of handled exceptions exception_table, Attribute[] Attributes of code: LineNumber or LocalVariable attributes, ConstantPool Array of constants constant_pool)
|
| Modifier and Type | Method and Description |
|---|---|
| public void | accept(ClassVisitor
Visitor object v)Implements abstract org. Implements org. |
| private final int | Returns: the full size of this code attribute, minus its first 6 bytes, including the size of all its contained attributes
|
| public final void | dump(DataOutputStream
Output file stream file)
Dump code attribute to file stream in binary format.
|
| public final Attribute[] | |
| public final byte[] | |
| public String | getCodeString()
Returns the same as toString(true) except that the attribute information isn't included (line numbers). |
| public final CodeException[] | |
| private final int | Returns: the internal length of this code attribute (minus the first 6 bytes) and excluding all its attributes
|
| public LineNumberTable | |
| public LocalVariableTable | |
| public final int | |
| public final int | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final void | |
| public final String | |
| public final String | Returns: String representation of code chunk.Overrides org. |
| attributes | back to summary |
|---|---|
| private Attribute[] attributes | |
| code | back to summary |
|---|---|
| private byte[] code | |
| exceptionTable | back to summary |
|---|---|
| private CodeException[] exceptionTable | |
| maxLocals | back to summary |
|---|---|
| private int maxLocals | |
| maxStack | back to summary |
|---|---|
| private int maxStack | |
| NO_EXCEPTIONS | back to summary |
|---|---|
| private static final CodeException[] NO_EXCEPTIONS | |
| Code | back to summary |
|---|---|
| public Code(Code c) Initialize from another object. Note that both objects use the same references (shallow copy). Use copy() for a physical copy. | |
| Code | back to summary |
|---|---|
| pack-priv Code(int name_index, int length, DataInputStream file, ConstantPool constant_pool) throws IOException | |
| Code | back to summary |
|---|---|
public Code(int name_index, int length, int max_stack, int max_locals, byte[] code, CodeException[] exception_table, Attribute[] attributes, ConstantPool constant_pool)
| |
| accept | back to summary |
|---|---|
| public void accept(ClassVisitor v) Implements abstract org. Implements org. Called by objects that are traversing the nodes of the tree implicitely defined by the contents of a Java class. I.e., the hierarchy of methods, fields, attributes, etc. spawns a tree of objects.
| |
| calculateLength | back to summary |
|---|---|
private final int calculateLength()
| |
| dump | back to summary |
|---|---|
| public final void dump(DataOutputStream file) throws IOException Overrides org. Dump code attribute to file stream in binary format.
| |
| getAttributes | back to summary |
|---|---|
| public final Attribute[] getAttributes() | |
| getCode | back to summary |
|---|---|
public final byte[] getCode()
| |
| getCodeString | back to summary |
|---|---|
| public String getCodeString() Returns the same as toString(true) except that the attribute information isn't included (line numbers). Can be used to check whether two pieces of code are equivalent. | |
| getExceptionTable | back to summary |
|---|---|
public final CodeException[] getExceptionTable()
| |
| getInternalLength | back to summary |
|---|---|
private final int getInternalLength()
| |
| getLineNumberTable | back to summary |
|---|---|
public LineNumberTable getLineNumberTable()
| |
| getLocalVariableTable | back to summary |
|---|---|
public LocalVariableTable getLocalVariableTable()
| |
| getMaxLocals | back to summary |
|---|---|
public final int getMaxLocals()
| |
| getMaxStack | back to summary |
|---|---|
public final int getMaxStack()
| |
| setAttributes | back to summary |
|---|---|
| public final void setAttributes(Attribute[] attributes) | |
| setCode | back to summary |
|---|---|
public final void setCode(byte[] code)
| |
| setExceptionTable | back to summary |
|---|---|
public final void setExceptionTable(CodeException[] exception_table)
| |
| setMaxLocals | back to summary |
|---|---|
public final void setMaxLocals(int max_locals)
| |
| setMaxStack | back to summary |
|---|---|
public final void setMaxStack(int max_stack)
| |
| toString | back to summary |
|---|---|
public final String toString(boolean verbose)
| |
| toString | back to summary |
|---|---|
| public final String toString() Overrides org. Doc from java. Returns a string representation of the object. | |