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 CodeAttr
instead.
-
allocate_local(Variable)
- Allocate slots for a local variable (or parameter).
Deprecated.
-
assign_local(Variable, int)
- Assign a local variable to a given slot.
Deprecated.
-
compile_checkcast(Type)
-
-
compile_linenumber(int)
-
-
compile_push_this()
-
-
compile_push_value(Variable)
-
Deprecated.
-
compile_store_value(Variable)
-
Deprecated.
-
compile_tailcall(boolean)
- Compile a tail-call to position 0 of the current procewure.
-
getAttributes()
-
-
getCode()
-
-
getConstants()
-
-
getDeclaringClass()
-
-
getModifiers()
-
-
getName()
-
-
getParameterTypes()
-
-
getReturnType()
-
-
getSignature()
-
-
getStaticFlag()
-
-
init_param_slots()
-
-
initCode()
- Allocate a Code attribute, and prepare to generate code.
-
maybe_compile_checkcast(Type)
-
-
popScope()
-
-
push_var(Variable)
- Comple code to push the contents of a local variable onto the statck.
Deprecated.
-
pushScope()
-
-
reachableHere()
- True if control could reach here.
-
setAttributes(Attribute)
-
-
setModifiers(int)
-
-
setName(int)
-
-
setName(String)
-
-
setSignature(int)
-
-
setSignature(String)
-
-
setStaticFlag(boolean)
-
getAttributes
public final Attribute getAttributes()
setAttributes
public final void setAttributes(Attribute attributes)
getCode
public final CodeAttr getCode()
setModifiers
public final void setModifiers(int m)
getModifiers
public final int getModifiers()
setStaticFlag
public final void setStaticFlag(boolean is_static)
getStaticFlag
public final boolean getStaticFlag()
getConstants
public final ConstantPool getConstants()
pushScope
public Scope pushScope()
reachableHere
public boolean reachableHere()
- True if control could reach here.
popScope
public Scope popScope()
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)
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.
initCode
public void initCode()
- Allocate a Code attribute, and prepare to generate code.
init_param_slots
public void init_param_slots()
compile_checkcast
public void compile_checkcast(Type type)
maybe_compile_checkcast
public void maybe_compile_checkcast(Type type)
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.
compile_push_value
public void compile_push_value(Variable var)
- Note: compile_push_value() is deprecated.
compile_store_value
public void compile_store_value(Variable var)
- Note: compile_store_value() is deprecated.
compile_push_this
public void compile_push_this()
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.
compile_linenumber
public void compile_linenumber(int linenumber)
getSignature
public String getSignature()
setSignature
public void setSignature(String signature)
setSignature
public void setSignature(int signature_index)
getDeclaringClass
public ClassType getDeclaringClass()
getReturnType
public final Type getReturnType()
getParameterTypes
public final Type[] getParameterTypes()
getName
public final String getName()
setName
public final void setName(String name)
setName
public final void setName(int name_index)
All Packages Class Hierarchy This Package Previous Next Index