All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class gnu.bytecode.Method

java.lang.Object
   |
   +----gnu.bytecode.Method

public class Method
extends Object
implements AttrContainer
Represents a method in a 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 CodeAttrinstead.


Method Index

 o allocate_local(Variable)
Allocate slots for a local variable (or parameter). Deprecated.
 o assign_local(Variable, int)
Assign a local variable to a given slot. Deprecated.
 o compile_checkcast(Type)
 o compile_linenumber(int)
 o compile_push_this()
 o compile_push_value(Variable)
Deprecated.
 o compile_store_value(Variable)
Deprecated.
 o compile_tailcall(boolean)
Compile a tail-call to position 0 of the current procewure.
 o getAttributes()
 o getCode()
 o getConstants()
 o getDeclaringClass()
 o getModifiers()
 o getName()
 o getParameterTypes()
 o getReturnType()
 o getSignature()
 o getStaticFlag()
 o init_param_slots()
 o initCode()
Allocate a Code attribute, and prepare to generate code.
 o maybe_compile_checkcast(Type)
 o popScope()
 o push_var(Variable)
Comple code to push the contents of a local variable onto the statck. Deprecated.
 o pushScope()
 o reachableHere()
True if control could reach here.
 o setAttributes(Attribute)
 o setModifiers(int)
 o setName(int)
 o setName(String)
 o setSignature(int)
 o setSignature(String)
 o setStaticFlag(boolean)

Methods

 o getAttributes
 public final Attribute getAttributes()
 o setAttributes
 public final void setAttributes(Attribute attributes)
 o getCode
 public final CodeAttr getCode()
 o setModifiers
 public final void setModifiers(int m)
 o getModifiers
 public final int getModifiers()
 o setStaticFlag
 public final void setStaticFlag(boolean is_static)
 o getStaticFlag
 public final boolean getStaticFlag()
 o getConstants
 public final ConstantPool getConstants()
 o pushScope
 public Scope pushScope()
 o reachableHere
 public boolean reachableHere()
True if control could reach here.

 o popScope
 public Scope popScope()
 o assign_local
 public boolean assign_local(Variable local,
                             int slot)
Note: assign_local() is deprecated.

Assign a local variable to a given slot.

Parameters:
local - the Variable to assign
slot - the local variable slot desired
Returns:
true iff we succeeded (i.e. the slot was unused)
 o allocate_local
 public void allocate_local(Variable local)
Note: allocate_local() is deprecated.

Allocate slots for a local variable (or parameter).

Parameters:
local - the variable we need to allocate
Returns:
the index of the (first) slot.
 o initCode
 public void initCode()
Allocate a Code attribute, and prepare to generate code.

 o init_param_slots
 public void init_param_slots()
 o compile_checkcast
 public void compile_checkcast(Type type)
 o maybe_compile_checkcast
 public void maybe_compile_checkcast(Type type)
 o push_var
 public void push_var(Variable var)
Note: push_var() is deprecated.

Comple code to push the contents of a local variable onto the statck.

Parameters:
var - The variable whose contents we want to push.
 o compile_push_value
 public void compile_push_value(Variable var)
Note: compile_push_value() is deprecated.

 o compile_store_value
 public void compile_store_value(Variable var)
Note: compile_store_value() is deprecated.

 o compile_push_this
 public void compile_push_this()
 o compile_tailcall
 public void compile_tailcall(boolean pop_args)
Compile a tail-call to position 0 of the current procewure. If pop_args is true, copy argument registers (except this) from stack.

 o compile_linenumber
 public void compile_linenumber(int linenumber)
 o getSignature
 public String getSignature()
 o setSignature
 public void setSignature(String signature)
 o setSignature
 public void setSignature(int signature_index)
 o getDeclaringClass
 public ClassType getDeclaringClass()
 o getReturnType
 public final Type getReturnType()
 o getParameterTypes
 public final Type[] getParameterTypes()
 o getName
 public final String getName()
 o setName
 public final void setName(String name)
 o setName
 public final void setName(int name_index)

All Packages  Class Hierarchy  This Package  Previous  Next  Index