public class BasicBranchUnit extends Object implements BranchUnit
| Constructor and Description |
|---|
BasicBranchUnit() |
| Modifier and Type | Method and Description |
|---|---|
void |
branch(Clazz clazz,
CodeAttribute codeAttribute,
int offset,
int branchTarget)
Sets the new instruction offset.
|
void |
branchConditionally(Clazz clazz,
CodeAttribute codeAttribute,
int offset,
int branchTarget,
int conditional)
Sets the new instruction offset, depending on the certainty of the
conditional branch.
|
InstructionOffsetValue |
getTraceBranchTargets() |
void |
resetCalled()
Resets the flag that tells whether any of the branch unit commands was
called.
|
void |
returnFromMethod()
Returns from the method with the given value.
|
protected void |
setCalled()
Sets the flag that tells whether any of the branch unit commands was
called.
|
void |
setTraceBranchTargets(InstructionOffsetValue branchTargets)
Sets the initial branch targets, which will be updated as the branch
methods of the branch unit are called.
|
void |
throwException()
Handles the throwing of an exception.
|
boolean |
wasCalled()
Returns whether any of the branch unit commands was called.
|
public void resetCalled()
protected void setCalled()
public boolean wasCalled()
public void setTraceBranchTargets(InstructionOffsetValue branchTargets)
public InstructionOffsetValue getTraceBranchTargets()
public void branch(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget)
BranchUnitbranch in interface BranchUnitpublic void branchConditionally(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget, int conditional)
BranchUnitbranchConditionally in interface BranchUnitpublic void returnFromMethod()
BranchUnitreturnFromMethod in interface BranchUnitpublic void throwException()
BranchUnitthrowException in interface BranchUnitCopyright © 2015. All Rights Reserved.