|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.rice.cs.cunit.classFile.code.instructions.AInstruction edu.rice.cs.cunit.classFile.code.instructions.BranchInstruction
public class BranchInstruction
Branch Java instruction.
Field Summary | |
---|---|
protected byte |
_opcode
Opcode. |
protected int |
_target
Branch target. |
Constructor Summary | |
---|---|
BranchInstruction(byte[] bytecode,
int pc,
int paddingPC,
LineNumberTable lnt)
Make a new branch instruction from the bytecode stating at pc, padded using paddingPC, and use the line number table for branches. |
|
BranchInstruction(byte opcode,
int target)
Constructor. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object o)
Return true of this instruction and the other object are equal. |
int[] |
getBranchTargets()
Return an array of target indices. |
byte[] |
getBytecode(int pc,
LineNumberTable lnt)
Get the bytecode for this instruction, padded for the specified program counter value, with branch targets according to the specified line number table * @param pc PC for padding |
int |
getBytecodeLength(int pc)
Get the length bytecode for this instruction, padded for the specified program counter value. |
byte |
getOpcode()
Get the opcode of this instruction. |
int |
hashCode()
Return hash code. |
void |
setBranchTargets(int[] branchTargets)
Set the branch target indices. |
java.lang.String |
toString()
Return instruction in human-readable form. |
Methods inherited from class edu.rice.cs.cunit.classFile.code.instructions.AInstruction |
---|
getCorrespondingLoad, getCorrespondingStore, makeInstruction, toStringVerbose |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected byte _opcode
protected int _target
Constructor Detail |
---|
public BranchInstruction(byte opcode, int target)
opcode
- branch opcodetarget
- target line numberpublic BranchInstruction(byte[] bytecode, int pc, int paddingPC, LineNumberTable lnt)
bytecode
- bytecodepc
- starting index in bytecodepaddingPC
- PC for paddinglnt
- line number table for branchesMethod Detail |
---|
public byte getOpcode()
getOpcode
in class AInstruction
public int getBytecodeLength(int pc)
getBytecodeLength
in class AInstruction
pc
- PC for padding
public byte[] getBytecode(int pc, LineNumberTable lnt)
getBytecode
in class AInstruction
lnt
- line number table for branchespc
- PC for padding
public boolean equals(java.lang.Object o)
equals
in class AInstruction
o
- other object
public int hashCode()
hashCode
in class AInstruction
public int[] getBranchTargets()
getBranchTargets
in class AInstruction
public void setBranchTargets(int[] branchTargets)
setBranchTargets
in class AInstruction
branchTargets
- array of target indicespublic java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |