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 DecodedSwitchswitchDataprivate ExpressionswitchOn
-
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 voidcollectLValueUsage(LValueUsageCollector lValueUsageCollector)StatementdeepClone(CloneHelper cloneHelper)Dumperdump(Dumper dumper)booleanequivalentUnder(java.lang.Object o, EquivalenceConstraint constraint)booleanfallsToNext()BytecodeLocgetCombinedLoc()StructuredStatementgetStructuredStatement()DecodedSwitchgetSwitchData()ExpressiongetSwitchOn()SwitchStatementgetSwitchStatement(BlockIdentifier blockIdentifier)voidreplaceSingleUsageLValues(LValueRewriter lValueRewriter, SSAIdentifiers ssaIdentifiers)voidrewriteExpressions(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:
fallsToNextin interfaceStatement- Overrides:
fallsToNextin classAbstractStatement
-
-