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 BlockIdentifierprivate final booleanprivate 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 TypeMethodDescriptionvoidapplyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags) voidcollectTypeUsages(TypeUsageCollector collector) booleanbooleanbooleanbooleanvoidbooleanmatch(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector) booleanrewriteBoxing(PrimitiveBoxingRewriter boxingRewriter) voidrewriteExpressions(ExpressionRewriter expressionRewriter) booleanvoidtraceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer) Methods inherited from class AbstractStructuredBlockStatement
getBody, isRecursivelyStructured, transformStructuredChildrenMethods inherited from class 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:
getCombinedLocin interfaceHasByteCodeLoc
-
getSwitchOn
-
collectTypeUsages
- Specified by:
collectTypeUsagesin interfaceTypeUsageCollectable- Overrides:
collectTypeUsagesin classAbstractStructuredBlockStatement
-
dump
-
getBreakableBlockOrNull
- Specified by:
getBreakableBlockOrNullin interfaceStructuredStatement- Overrides:
getBreakableBlockOrNullin classAbstractStructuredStatement
-
supportsBreak
public boolean supportsBreak()- Specified by:
supportsBreakin interfaceStructuredStatement- Overrides:
supportsBreakin classAbstractStructuredStatement
-
isProperlyStructured
public boolean isProperlyStructured()- Specified by:
isProperlyStructuredin interfaceStructuredStatement- Overrides:
isProperlyStructuredin classAbstractStructuredStatement
-
isScopeBlock
public boolean isScopeBlock()- Specified by:
isScopeBlockin interfaceStructuredStatement- Overrides:
isScopeBlockin classAbstractStructuredStatement
-
rewriteBoxing
- Specified by:
rewriteBoxingin interfaceBoxingProcessor
-
applyNonArgExpressionRewriter
public void applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags) - Specified by:
applyNonArgExpressionRewriterin interfaceBoxingProcessor
-
getBlockIdentifier
-
linearizeInto
- Specified by:
linearizeIntoin interfaceStructuredStatement
-
traceLocalVariableScope
- Specified by:
traceLocalVariableScopein interfaceStructuredStatement
-
match
public boolean match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector) - Specified by:
matchin interfaceMatcher<StructuredStatement>- Overrides:
matchin classAbstractStructuredStatement
-
rewriteExpressions
- Specified by:
rewriteExpressionsin interfaceStructuredStatement
-
isOnlyEmptyDefault
public boolean isOnlyEmptyDefault() -
isSafeExpression
public boolean isSafeExpression()
-