|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectedu.rit.classfile.Instruction
edu.rit.classfile.Location
public class Location
Class Location is a pseudoinstruction used to represent a location within a sequence of bytecodes that can be the target of a branch instruction. You add locations to a subroutine in the same way as you add instructions. You can branch either backward or forward to a location. For example:
SynthesizedMethodDescription theMethod = . . .; Location L1 = new Location(); Location L2 = new Location(); . . . theMethod.addInstruction (L1); . . . theMethod.addInstruction (Op.GOTO (L1)); . . . theMethod.addInstruction (Op.GOTO (L2)); . . . theMethod.addInstruction (L2);
Constructor Summary | |
---|---|
Location()
Construct a new location. |
Method Summary | |
---|---|
byte[] |
getByteCodes()
Returns a copy of this instruction's bytecodes. |
int |
getLength()
Returns this instruction's length, i.e., number of bytes. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Location()
Method Detail |
---|
public int getLength()
getLength
in class Instruction
public byte[] getByteCodes()
getByteCodes
in class Instruction
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |