Class StructuredSwitch
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.structured.statement.AbstractStructuredStatement
org.benf.cfr.reader.bytecode.analysis.structured.statement.AbstractStructuredBlockStatement
org.benf.cfr.reader.bytecode.analysis.structured.statement.StructuredSwitch
- All Implemented Interfaces:
HasByteCodeLoc
,Matcher<StructuredStatement>
,BoxingProcessor
,StructuredStatement
,Dumpable
,TypeUsageCollectable
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final BlockIdentifier
private final boolean
private Expression
-
Constructor Summary
ConstructorsConstructorDescriptionStructuredSwitch
(BytecodeLoc loc, Expression switchOn, Op04StructuredStatement body, BlockIdentifier blockIdentifier) StructuredSwitch
(BytecodeLoc loc, Expression switchOn, Op04StructuredStatement body, BlockIdentifier blockIdentifier, boolean safeExpression) -
Method Summary
Modifier and TypeMethodDescriptionvoid
applyNonArgExpressionRewriter
(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags) void
collectTypeUsages
(TypeUsageCollector collector) boolean
boolean
boolean
boolean
void
boolean
match
(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector) boolean
rewriteBoxing
(PrimitiveBoxingRewriter boxingRewriter) void
rewriteExpressions
(ExpressionRewriter expressionRewriter) boolean
void
traceLocalVariableScope
(LValueScopeDiscoverer scopeDiscoverer) Methods inherited from class org.benf.cfr.reader.bytecode.analysis.structured.statement.AbstractStructuredBlockStatement
getBody, isRecursivelyStructured, transformStructuredChildren
Methods inherited from class org.benf.cfr.reader.bytecode.analysis.structured.statement.AbstractStructuredStatement
addLoc, alwaysDefines, canDefine, canFall, claimBlock, fallsNopToNext, findCreatedHere, getContainer, getInline, getLoc, informBlockHeirachy, inlineable, isEffectivelyNOP, markCreator, setContainer, suggestName, supportsContinueBreak, toString, transformStructuredChildrenInReverse
-
Field Details
-
switchOn
-
blockIdentifier
-
safeExpression
private final boolean safeExpression
-
-
Constructor Details
-
StructuredSwitch
public StructuredSwitch(BytecodeLoc loc, Expression switchOn, Op04StructuredStatement body, BlockIdentifier blockIdentifier, boolean safeExpression) -
StructuredSwitch
public StructuredSwitch(BytecodeLoc loc, Expression switchOn, Op04StructuredStatement body, BlockIdentifier blockIdentifier)
-
-
Method Details
-
getCombinedLoc
- Specified by:
getCombinedLoc
in interfaceHasByteCodeLoc
-
getSwitchOn
-
collectTypeUsages
- Specified by:
collectTypeUsages
in interfaceTypeUsageCollectable
- Overrides:
collectTypeUsages
in classAbstractStructuredBlockStatement
-
dump
-
getBreakableBlockOrNull
- Specified by:
getBreakableBlockOrNull
in interfaceStructuredStatement
- Overrides:
getBreakableBlockOrNull
in classAbstractStructuredStatement
-
supportsBreak
public boolean supportsBreak()- Specified by:
supportsBreak
in interfaceStructuredStatement
- Overrides:
supportsBreak
in classAbstractStructuredStatement
-
isProperlyStructured
public boolean isProperlyStructured()- Specified by:
isProperlyStructured
in interfaceStructuredStatement
- Overrides:
isProperlyStructured
in classAbstractStructuredStatement
-
isScopeBlock
public boolean isScopeBlock()- Specified by:
isScopeBlock
in interfaceStructuredStatement
- Overrides:
isScopeBlock
in classAbstractStructuredStatement
-
rewriteBoxing
- Specified by:
rewriteBoxing
in interfaceBoxingProcessor
-
applyNonArgExpressionRewriter
public void applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags) - Specified by:
applyNonArgExpressionRewriter
in interfaceBoxingProcessor
-
getBlockIdentifier
-
linearizeInto
- Specified by:
linearizeInto
in interfaceStructuredStatement
-
traceLocalVariableScope
- Specified by:
traceLocalVariableScope
in interfaceStructuredStatement
-
match
public boolean match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector) - Specified by:
match
in interfaceMatcher<StructuredStatement>
- Overrides:
match
in classAbstractStructuredStatement
-
rewriteExpressions
- Specified by:
rewriteExpressions
in interfaceStructuredStatement
-
isOnlyEmptyDefault
public boolean isOnlyEmptyDefault() -
isSafeExpression
public boolean isSafeExpression()
-