Class SwitchStatement
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.parse.statement.AbstractStatement
-
- org.benf.cfr.reader.bytecode.analysis.parse.statement.SwitchStatement
-
- All Implemented Interfaces:
HasByteCodeLoc
,DeepCloneable<Statement>
,Statement
,ComparableUnderEC
,Dumpable
public class SwitchStatement extends AbstractStatement
-
-
Field Summary
Fields Modifier and Type Field Description private boolean
safeExpression
private BlockIdentifier
switchBlock
private Expression
switchOn
-
Constructor Summary
Constructors Constructor Description SwitchStatement(BytecodeLoc loc, Expression switchOn, BlockIdentifier switchBlock)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
collectLValueUsage(LValueUsageCollector lValueUsageCollector)
Statement
deepClone(CloneHelper cloneHelper)
Dumper
dump(Dumper dumper)
boolean
equivalentUnder(java.lang.Object o, EquivalenceConstraint constraint)
boolean
fallsToNext()
BytecodeLoc
getCombinedLoc()
StructuredStatement
getStructuredStatement()
BlockIdentifier
getSwitchBlock()
Expression
getSwitchOn()
void
replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers)
void
rewriteExpressions(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers)
void
setLifetimeHint(LValue lv, boolean usedInChildren)
void
setSwitchOn(Expression switchOn)
java.util.Set<LValue>
wantsLifetimeHint()
-
Methods inherited from class org.benf.cfr.reader.bytecode.analysis.parse.statement.AbstractStatement
addLoc, canThrow, collectLocallyMutatedVariables, collectLValueAssignments, collectObjectCreation, doesBlackListLValueReplacement, getCompoundParts, getContainer, getCreatedLValue, getLoc, getRValue, getTargetStatement, isCompound, outerDeepClone, setContainer, toString
-
-
-
-
Field Detail
-
switchOn
private Expression switchOn
-
switchBlock
private final BlockIdentifier switchBlock
-
safeExpression
private boolean safeExpression
-
-
Constructor Detail
-
SwitchStatement
SwitchStatement(BytecodeLoc loc, Expression switchOn, BlockIdentifier switchBlock)
-
-
Method Detail
-
getCombinedLoc
public BytecodeLoc getCombinedLoc()
-
deepClone
public Statement deepClone(CloneHelper cloneHelper)
-
replaceSingleUsageLValues
public void replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers)
-
rewriteExpressions
public void rewriteExpressions(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers)
-
collectLValueUsage
public void collectLValueUsage(LValueUsageCollector lValueUsageCollector)
-
getStructuredStatement
public StructuredStatement getStructuredStatement()
-
getSwitchOn
public Expression getSwitchOn()
-
setSwitchOn
public void setSwitchOn(Expression switchOn)
-
getSwitchBlock
public BlockIdentifier getSwitchBlock()
-
equivalentUnder
public final boolean equivalentUnder(java.lang.Object o, EquivalenceConstraint constraint)
-
fallsToNext
public boolean fallsToNext()
- Specified by:
fallsToNext
in interfaceStatement
- Overrides:
fallsToNext
in classAbstractStatement
-
wantsLifetimeHint
public java.util.Set<LValue> wantsLifetimeHint()
- Specified by:
wantsLifetimeHint
in interfaceStatement
- Overrides:
wantsLifetimeHint
in classAbstractStatement
-
setLifetimeHint
public void setLifetimeHint(LValue lv, boolean usedInChildren)
- Specified by:
setLifetimeHint
in interfaceStatement
- Overrides:
setLifetimeHint
in classAbstractStatement
-
-