|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.multijava.util.classfile.AbstractInstructionAccessor
org.multijava.util.classfile.Instruction
org.multijava.util.classfile.JumpInstruction
This class represents instructions that take a label as argument.
| Field Summary | |
private InstructionAccessor |
target
|
private boolean |
wide
|
| Fields inherited from class org.multijava.util.classfile.Instruction |
|
| Constructor Summary | |
JumpInstruction(int opcode,
InstructionAccessor target)
Constructs a new instruction that takes a label as argument. |
|
| Method Summary | |
boolean |
canComplete()
Returns true iff control flow can reach the next instruction in textual order. |
(package private) void |
check(CodeEnv env,
int curStack)
Verifies the enclosed instruction and computes the stack height. |
(package private) void |
computeEndAddress(CodePosition position)
Computes the address of the end of the instruction. |
void |
dump()
|
int |
getPushedOnStack()
Returns the size of data pushed on the stack by this instruction |
byte |
getReturnType()
Returns the type pushed on the stack |
(package private) int |
getSize()
Returns the number of bytes used by the the instruction in the code array. |
int |
getStack()
Return the amount of stack (positive or negative) used by this instruction |
InstructionAccessor |
getTarget()
Return the target of this instruction |
(package private) void |
resolveConstants(ConstantPool cp)
Insert or check location of constant value on constant pool |
void |
setTarget(InstructionAccessor target)
Sets the target for this instruction |
void |
transformAccessors(AccessorTransformer transformer)
Transforms targets (deferences to actual instructions). |
(package private) void |
write(ConstantPool cp,
DataOutput out)
Write this instruction into a file |
| Methods inherited from class org.multijava.util.classfile.Instruction |
getAddress, getLocalVar, getOpcode, getPoppedFromStack, isLiteral, setAddress, setOpcode |
| Methods inherited from class org.multijava.util.classfile.AbstractInstructionAccessor |
transform |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
private InstructionAccessor target
private boolean wide
| Constructor Detail |
public JumpInstruction(int opcode,
InstructionAccessor target)
opcode - the opcode of the instructiontarget - the referenced instruction| Method Detail |
public boolean canComplete()
public void transformAccessors(AccessorTransformer transformer)
throws BadAccessorException
transformAccessors in interface AccessorContainertransformer - the transformer used to transform accessors
BadAccessorExceptionpublic void setTarget(InstructionAccessor target)
public InstructionAccessor getTarget()
int getSize()
void check(CodeEnv env,
int curStack)
throws ClassFileFormatException
check in class Instructionenv - the check environmentcurStack - the stack height at the end
of the execution of the instruction
ClassFileFormatException - a problem was detectedvoid computeEndAddress(CodePosition position)
computeEndAddress in class Instructionposition - the minimum and maximum address of the
begin of this instruction. This parameter
is changed to the minimum and maximum
address of the end of this instruction.public int getPushedOnStack()
public byte getReturnType()
public int getStack()
void resolveConstants(ConstantPool cp)
cp - the constant pool for this class
void write(ConstantPool cp,
DataOutput out)
throws IOException
cp - the constant pool that contain all dataout - the file where to write this object info
IOException - an io problem has occuredpublic void dump()
dump in class Instruction
|
mjc | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||