Class RawSwitchStatement
- java.lang.Object
-
- org.benf.cfr.reader.bytecode.analysis.parse.statement.AbstractStatement
-
- org.benf.cfr.reader.bytecode.analysis.parse.statement.RawSwitchStatement
-
- All Implemented Interfaces:
HasByteCodeLoc
,DeepCloneable<Statement>
,Statement
,ComparableUnderEC
,Dumpable
public class RawSwitchStatement extends AbstractStatement
A 'raw' switch contains the original bytecode information about the switch. We split this up into SwitchStatements and CaseStatements. Case statements are really no more than glorified comments, as they perform no function other than to serve as labels. However, we can embed useful information in them.
-
-
Field Summary
Fields Modifier and Type Field Description private DecodedSwitch
switchData
private Expression
switchOn
-
Constructor Summary
Constructors Constructor Description RawSwitchStatement(BytecodeLoc loc, Expression switchOn, DecodedSwitch switchData)
-
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()
DecodedSwitch
getSwitchData()
Expression
getSwitchOn()
SwitchStatement
getSwitchStatement(BlockIdentifier blockIdentifier)
void
replaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers)
void
rewriteExpressions(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers)
-
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, setLifetimeHint, toString, wantsLifetimeHint
-
-
-
-
Field Detail
-
switchOn
private Expression switchOn
-
switchData
private final DecodedSwitch switchData
-
-
Constructor Detail
-
RawSwitchStatement
public RawSwitchStatement(BytecodeLoc loc, Expression switchOn, DecodedSwitch switchData)
-
-
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)
-
getSwitchData
public DecodedSwitch getSwitchData()
-
getSwitchOn
public Expression getSwitchOn()
-
getStructuredStatement
public StructuredStatement getStructuredStatement()
-
getSwitchStatement
public SwitchStatement getSwitchStatement(BlockIdentifier blockIdentifier)
-
equivalentUnder
public final boolean equivalentUnder(java.lang.Object o, EquivalenceConstraint constraint)
-
fallsToNext
public boolean fallsToNext()
- Specified by:
fallsToNext
in interfaceStatement
- Overrides:
fallsToNext
in classAbstractStatement
-
-