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, setJumpType
addLoc, collectLocallyMutatedVariables, collectLValueAssignments, collectObjectCreation, doesBlackListLValueReplacement, getCompoundParts, getContainer, getCreatedLValue, getLoc, getRValue, getTargetStatement, isCompound, outerDeepClone, setContainer, setLifetimeHint, toString, wantsLifetimeHint
private 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 HasByteCodeLoc
getCombinedLoc
in class GotoStatement
public Dumper dump(Dumper dumper)
dump
in interface Dumpable
dump
in class GotoStatement
public void replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers)
replaceSingleUsageLValues
in interface Statement
replaceSingleUsageLValues
in class GotoStatement
public void rewriteExpressions(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers)
rewriteExpressions
in interface Statement
rewriteExpressions
in class GotoStatement
public void collectLValueUsage(LValueUsageCollector lValueUsageCollector)
collectLValueUsage
in interface Statement
collectLValueUsage
in class GotoStatement
public 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 GotoStatement
public boolean isConditional()
isConditional
in class GotoStatement
public boolean canThrow(ExceptionCheck caught)
canThrow
in interface Statement
canThrow
in class GotoStatement
public StructuredStatement getStructuredStatement()
getStructuredStatement
in interface Statement
getStructuredStatement
in class GotoStatement
public 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