|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectserp.bytecode.Instruction
serp.bytecode.TypedInstruction
serp.bytecode.LocalVariableInstruction
public abstract class LocalVariableInstruction
An instruction that has an argument of an index into the
local variable table of the current frame. This includes most of the
load
and store
instructions.
The local variable table size is fixed by the maxLocals
property of the code block. Long and double types take up 2 local variable
indexes.
Parameter values to methods are loaded into the local variable table prior to the execution of the first instruction. The 0 index of the table is set to the instance of the class the method is being invoked on.
Method Summary | |
---|---|
boolean |
equalsInstruction(Instruction other)
Two local variable instructions are equal if the local index they reference is equal or if either index is 0/unset. |
int |
getLocal()
Return the index of the local variable that this instruction operates on. |
LocalVariable |
getLocalVariable()
Return the local variable object this instruction operates on, or null if none. |
int |
getParam()
Return the parameter that this instruction operates on, or -1 if none. |
String |
getTypeName()
Return the type name for this instruction. |
LocalVariableInstruction |
setLocal(int index)
Set the index of the local variable that this instruction operates on. |
LocalVariableInstruction |
setLocalVariable(LocalVariable local)
Set the local variable object this instruction operates on. |
LocalVariableInstruction |
setParam(int param)
Set the method parameter that this instruction operates on. |
TypedInstruction |
setType(String type)
Set the type of this instruction. |
Methods inherited from class serp.bytecode.TypedInstruction |
---|
getType, getTypeBC, setType, setType |
Methods inherited from class serp.bytecode.Instruction |
---|
acceptVisit, getByteIndex, getClassLoader, getCode, getLineNumber, getLogicalStackChange, getName, getOpcode, getPool, getProject, getStackChange, isValid |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public String getTypeName()
TypedInstruction
getTypeName
in class TypedInstruction
public TypedInstruction setType(String type)
TypedInstruction
setType
in class TypedInstruction
public int getLocal()
public LocalVariableInstruction setLocal(int index)
public int getParam()
public LocalVariableInstruction setParam(int param)
public LocalVariable getLocalVariable()
LocalVariableTable.getLocalVariable(int)
public LocalVariableInstruction setLocalVariable(LocalVariable local)
public boolean equalsInstruction(Instruction other)
equalsInstruction
in class Instruction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |