Package proguard.evaluation
Class BasicBranchUnit
java.lang.Object
proguard.evaluation.BasicBranchUnit
- All Implemented Interfaces:
BranchUnit
This
BranchUnit remembers the branch unit commands that are invoked on it. It doesn't
consider conditions when branching.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbranch(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget) Sets the new instruction offset.voidbranchConditionally(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget, int conditional) Sets the new instruction offset, depending on the certainty of the conditional branch.Returns the accumulated branch targets that were passed to the branch unit methods.voidreset()Resets the accumulated branch targets and the flag that tells whether any of the branch unit methods was called.voidReturns from the method with the given value.voidHandles the throwing of an exception.booleanReturns whether any of the branch unit methods was called.
-
Field Details
-
traceBranchTargets
-
wasCalled
protected boolean wasCalled
-
-
Constructor Details
-
BasicBranchUnit
public BasicBranchUnit()
-
-
Method Details
-
reset
public void reset()Resets the accumulated branch targets and the flag that tells whether any of the branch unit methods was called. -
wasCalled
public boolean wasCalled()Returns whether any of the branch unit methods was called. -
getTraceBranchTargets
Returns the accumulated branch targets that were passed to the branch unit methods. -
branch
Description copied from interface:BranchUnitSets the new instruction offset.- Specified by:
branchin interfaceBranchUnit
-
branchConditionally
public void branchConditionally(Clazz clazz, CodeAttribute codeAttribute, int offset, int branchTarget, int conditional) Description copied from interface:BranchUnitSets the new instruction offset, depending on the certainty of the conditional branch.- Specified by:
branchConditionallyin interfaceBranchUnit
-
returnFromMethod
public void returnFromMethod()Description copied from interface:BranchUnitReturns from the method with the given value.- Specified by:
returnFromMethodin interfaceBranchUnit
-
throwException
public void throwException()Description copied from interface:BranchUnitHandles the throwing of an exception.- Specified by:
throwExceptionin interfaceBranchUnit
-