|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.rej.java.instruction.Instruction
public abstract class Instruction
This class represents a java bytecode instruction. It is the abstract
superclass of instruction type classes(_aload
,
_nop
, _invokeinterface
, etc..)
Method Summary | |
---|---|
Instruction |
createNewInstance()
Returns a new instance of this instruction. |
abstract void |
execute(ExecutionContext ec)
Reserved for possible future use. |
abstract byte[] |
getData(DecompilationContext dc)
Get the bytecode data for this instruction. |
java.util.List<Label> |
getLabels()
Return a list with labels relevant to this instructions. |
abstract java.lang.String |
getMnemonic()
Return the mnemonic of this instruction. |
abstract int |
getOpcode()
Return the Opcode of this instruction. |
abstract Parameters |
getParameters()
Return a Parameters object describing the types of parameters(if any) and the values set to this particular instance for those parameters. |
abstract Parameters |
getParameterTypes()
Return a Parameters object describing the types of parameters(if any) that are applicable to this type of an instruction. |
java.util.List<StackElement> |
getPoppedElements(DecompilationContext dc)
Returns the elements popped from the stack by this instance. |
java.util.List<StackElement> |
getPushedElements(DecompilationContext dc)
Returns the elements pushed to the stack by this instance. |
abstract int |
getSize()
Return the size of this instruction. |
int |
getSize(DecompilationContext dc)
Override for variable sized instructions. |
abstract void |
setData(byte[] data,
DecompilationContext dc)
Set the data for this instruction. |
abstract void |
setParameters(Parameters params)
Update the parameter values of this instruction with the values in the Parameters object defined by params. |
java.lang.String |
toString()
Returns a textual description of this instruction instance. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public abstract int getOpcode()
public abstract java.lang.String getMnemonic()
public abstract int getSize()
public abstract void execute(ExecutionContext ec)
ec
- Context for execution.public int getSize(DecompilationContext dc)
dc
- Context information(most importantly the pc position).
public abstract void setData(byte[] data, DecompilationContext dc)
data
- A byte arrray with the instruction data, starting with the
opcode byte(s) and followed by any parameters if applicable.dc
- A callback mechanism to offer the instruction information
about the context where it's located.public abstract byte[] getData(DecompilationContext dc)
dc
- A callback mechanism to offer the instruction information
about the context where it's located.
public abstract Parameters getParameters()
Parameters
object with the types and current
values of the parameters.public abstract Parameters getParameterTypes()
Parameters
object with the types of parameters
applicable for this type of an instruction.public abstract void setParameters(Parameters params)
params
- A Parameters
object with new values for this
instruction.public java.util.List<Label> getLabels()
List
of Label
objects.public java.lang.String toString()
toString
in class java.lang.Object
public Instruction createNewInstance() throws java.lang.InstantiationException, java.lang.IllegalAccessException
java.lang.InstantiationException
- a problem with instantiation.
java.lang.IllegalAccessException
- access exception.public java.util.List<StackElement> getPushedElements(DecompilationContext dc)
dc
- the decompilation context so that the processing can access
the constant pool, when necessary.
StackElements
instance describing the elements
pushed onto the stack.public java.util.List<StackElement> getPoppedElements(DecompilationContext dc)
dc
- the decompilation context so that the processing can access
the constant pool, when necessary.
StackElements
instance describing the elements
popped from the stack.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |