gnu.bytecode
public class Method extends Object implements AttrContainer, Member
ClassType
.
A Method
contain a CodeAttr
object;
the interface for generating bytecode instructions is primarily
in CodeAttr
.
All the methods whose name start with compile_
are
deprecated, and should not be used; use the methods
in CodeAttr
instead.
Method Summary | |
---|---|
void | allocate_local(Variable local)
Allocate slots for a local variable (or parameter). |
void | cleanupAfterCompilation() |
void | compile_checkcast(Type type) |
void | compile_push_this() |
void | compile_push_value(Variable var) |
void | compile_store_value(Variable var) |
Attribute | getAttributes() |
CodeAttr | getCode() |
ConstantPool | getConstants() |
ClassType | getDeclaringClass() |
ExceptionsAttr | getExceptionAttr() |
ClassType[] | getExceptions() |
int | getModifiers() |
String | getName() |
Method | getNext() |
Type[] | getParameterTypes() |
Type | getReturnType() |
String | getSignature() |
boolean | getStaticFlag() |
void | initCode() Allocate a Code attribute, and prepare to generate code.
|
void | init_param_slots() |
boolean | isAbstract() |
void | listParameters(StringBuffer sbuf) |
static Method | makeCloneMethod(Type returnType) Make a generic "clone" method.
|
void | maybe_compile_checkcast(Type type) |
Scope | popScope() |
Scope | pushScope() |
void | push_var(Variable var)
Comple code to push the contents of a local variable onto the statck. |
boolean | reachableHere() True if control could reach here. |
void | setAttributes(Attribute attributes) |
void | setExceptions(short[] exn_indices) |
void | setExceptions(ClassType[] exn_types) |
void | setModifiers(int modifiers) |
void | setName(String name) |
void | setName(int name_index) |
void | setSignature(String signature) |
void | setSignature(int signature_index) |
void | setStaticFlag(boolean is_static) |
CodeAttr | startCode() Recommended method to create a new CodeAttr for this Method. |
String | toString() |
Deprecated:
Allocate slots for a local variable (or parameter).Parameters: local the variable we need to allocate
Deprecated:
Deprecated:
Deprecated: Use startCode instead
Deprecated:
Comple code to push the contents of a local variable onto the statck.Parameters: var The variable whose contents we want to push.