public class IfStatement extends GotoStatement
| Modifier and Type | Field and Description |
|---|---|
private ConditionalExpression |
condition |
private static int |
JUMP_NOT_TAKEN |
private static int |
JUMP_TAKEN |
private BlockIdentifier |
knownElseBlock |
private BlockIdentifier |
knownIfBlock |
| Constructor and Description |
|---|
IfStatement(BytecodeLoc loc,
ConditionalExpression conditionalExpression) |
deepClone, equivalentUnder, fallsToNext, getJumpType, getTargetStartBlock, setJumpTypeaddLoc, collectLocallyMutatedVariables, collectLValueAssignments, collectObjectCreation, doesBlackListLValueReplacement, getCompoundParts, getContainer, getCreatedLValue, getLoc, getRValue, getTargetStatement, isCompound, outerDeepClone, setContainer, setLifetimeHint, toString, wantsLifetimeHintprivate static final int JUMP_NOT_TAKEN
private static final int JUMP_TAKEN
private ConditionalExpression condition
private BlockIdentifier knownIfBlock
private BlockIdentifier knownElseBlock
public IfStatement(BytecodeLoc loc, ConditionalExpression conditionalExpression)
public BytecodeLoc getCombinedLoc()
getCombinedLoc in interface HasByteCodeLocgetCombinedLoc in class GotoStatementpublic Dumper dump(Dumper dumper)
dump in interface Dumpabledump in class GotoStatementpublic void replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers)
replaceSingleUsageLValues in interface StatementreplaceSingleUsageLValues in class GotoStatementpublic void rewriteExpressions(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers)
rewriteExpressions in interface StatementrewriteExpressions in class GotoStatementpublic void collectLValueUsage(LValueUsageCollector lValueUsageCollector)
collectLValueUsage in interface StatementcollectLValueUsage in class GotoStatementpublic ConditionalExpression getCondition()
public void setCondition(ConditionalExpression condition)
public void simplifyCondition()
public void negateCondition()
public void replaceWithWhileLoopStart(BlockIdentifier blockIdentifier)
public void replaceWithWhileLoopEnd(BlockIdentifier blockIdentifier)
public Statement getJumpTarget()
getJumpTarget in class GotoStatementpublic boolean isConditional()
isConditional in class GotoStatementpublic boolean canThrow(ExceptionCheck caught)
canThrow in interface StatementcanThrow in class GotoStatementpublic StructuredStatement getStructuredStatement()
getStructuredStatement in interface StatementgetStructuredStatement in class GotoStatementpublic void setKnownBlocks(BlockIdentifier ifBlock, BlockIdentifier elseBlock)
public Pair<BlockIdentifier,BlockIdentifier> getBlocks()
public BlockIdentifier getKnownIfBlock()
public boolean hasElseBlock()
public void optimiseForTypes()
public boolean equals(java.lang.Object o)
equals in class GotoStatement