org.apache.bcel.classfile
public final class Code extends Attribute
See Also: Attribute CodeException LineNumberTable LocalVariableTable
Constructor Summary | |
---|---|
Code(Code c)
Initialize from another object. | |
Code(int name_index, int length, int max_stack, int max_locals, byte[] code, CodeException[] exception_table, Attribute[] attributes, ConstantPool constant_pool) |
Method Summary | |
---|---|
void | accept(Visitor v)
Called by objects that are traversing the nodes of the tree implicitely
defined by the contents of a Java class. |
Attribute | copy(ConstantPool _constant_pool) |
void | dump(DataOutputStream file)
Dump code attribute to file stream in binary format.
|
Attribute[] | getAttributes() |
byte[] | getCode() |
CodeException[] | getExceptionTable() |
LineNumberTable | getLineNumberTable() |
LocalVariableTable | getLocalVariableTable() |
int | getMaxLocals() |
int | getMaxStack() |
void | setAttributes(Attribute[] attributes) |
void | setCode(byte[] code) |
void | setExceptionTable(CodeException[] exception_table) |
void | setMaxLocals(int max_locals) |
void | setMaxStack(int max_stack) |
String | toString(boolean verbose) |
String | toString() |
Parameters: name_index Index pointing to the name Code length Content length in bytes max_stack Maximum size of stack max_locals Number of local variables code Actual byte code exception_table Table of handled exceptions attributes Attributes of code: LineNumber or LocalVariable constant_pool Array of constants
Parameters: v Visitor object
Parameters: _constant_pool the constant pool to duplicate
Returns: deep copy of this attribute
Parameters: file Output file stream
Throws: IOException
Returns: Collection of code attributes.
See Also: Attribute
Returns: Actual byte code of the method.
Returns: Table of handled exceptions.
See Also: CodeException
Returns: LineNumberTable of Code, if it has one
Returns: LocalVariableTable of Code, if it has one
Returns: Number of local variables.
Returns: Maximum size of stack used by this method.
Parameters: attributes the attributes to set for this Code
Parameters: code byte code
Parameters: exception_table exception table
Parameters: max_locals maximum number of local variables
Parameters: max_stack maximum stack size
Returns: String representation of code chunk.
Returns: String representation of code chunk.