public class StructuredSwitch extends AbstractStructuredBlockStatement implements BoxingProcessor
Modifier and Type | Field and Description |
---|---|
private BlockIdentifier |
blockIdentifier |
private boolean |
safeExpression |
private Expression |
switchOn |
Constructor and Description |
---|
StructuredSwitch(BytecodeLoc loc,
Expression switchOn,
Op04StructuredStatement body,
BlockIdentifier blockIdentifier) |
StructuredSwitch(BytecodeLoc loc,
Expression switchOn,
Op04StructuredStatement body,
BlockIdentifier blockIdentifier,
boolean safeExpression) |
Modifier and Type | Method and Description |
---|---|
void |
applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter,
SSAIdentifiers ssaIdentifiers,
StatementContainer statementContainer,
ExpressionRewriterFlags flags) |
void |
collectTypeUsages(TypeUsageCollector collector) |
Dumper |
dump(Dumper dumper) |
BlockIdentifier |
getBlockIdentifier() |
BlockIdentifier |
getBreakableBlockOrNull() |
BytecodeLoc |
getCombinedLoc() |
Expression |
getSwitchOn() |
boolean |
isOnlyEmptyDefault() |
boolean |
isProperlyStructured() |
boolean |
isSafeExpression() |
boolean |
isScopeBlock() |
void |
linearizeInto(java.util.List<StructuredStatement> out) |
boolean |
match(MatchIterator<StructuredStatement> matchIterator,
MatchResultCollector matchResultCollector) |
boolean |
rewriteBoxing(PrimitiveBoxingRewriter boxingRewriter) |
void |
rewriteExpressions(ExpressionRewriter expressionRewriter) |
boolean |
supportsBreak() |
void |
traceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer) |
getBody, isRecursivelyStructured, transformStructuredChildren
addLoc, alwaysDefines, canDefine, canFall, claimBlock, fallsNopToNext, findCreatedHere, getContainer, getInline, getLoc, informBlockHeirachy, inlineable, isEffectivelyNOP, markCreator, setContainer, suggestName, supportsContinueBreak, toString, transformStructuredChildrenInReverse
private Expression switchOn
private final BlockIdentifier blockIdentifier
private final boolean safeExpression
public StructuredSwitch(BytecodeLoc loc, Expression switchOn, Op04StructuredStatement body, BlockIdentifier blockIdentifier, boolean safeExpression)
public StructuredSwitch(BytecodeLoc loc, Expression switchOn, Op04StructuredStatement body, BlockIdentifier blockIdentifier)
public BytecodeLoc getCombinedLoc()
getCombinedLoc
in interface HasByteCodeLoc
public Expression getSwitchOn()
public void collectTypeUsages(TypeUsageCollector collector)
collectTypeUsages
in interface TypeUsageCollectable
collectTypeUsages
in class AbstractStructuredBlockStatement
public BlockIdentifier getBreakableBlockOrNull()
getBreakableBlockOrNull
in interface StructuredStatement
getBreakableBlockOrNull
in class AbstractStructuredStatement
public boolean supportsBreak()
supportsBreak
in interface StructuredStatement
supportsBreak
in class AbstractStructuredStatement
public boolean isProperlyStructured()
isProperlyStructured
in interface StructuredStatement
isProperlyStructured
in class AbstractStructuredStatement
public boolean isScopeBlock()
isScopeBlock
in interface StructuredStatement
isScopeBlock
in class AbstractStructuredStatement
public boolean rewriteBoxing(PrimitiveBoxingRewriter boxingRewriter)
rewriteBoxing
in interface BoxingProcessor
public void applyNonArgExpressionRewriter(ExpressionRewriter expressionRewriter, SSAIdentifiers ssaIdentifiers, StatementContainer statementContainer, ExpressionRewriterFlags flags)
applyNonArgExpressionRewriter
in interface BoxingProcessor
public BlockIdentifier getBlockIdentifier()
public void linearizeInto(java.util.List<StructuredStatement> out)
linearizeInto
in interface StructuredStatement
public void traceLocalVariableScope(LValueScopeDiscoverer scopeDiscoverer)
traceLocalVariableScope
in interface StructuredStatement
public boolean match(MatchIterator<StructuredStatement> matchIterator, MatchResultCollector matchResultCollector)
match
in interface Matcher<StructuredStatement>
match
in class AbstractStructuredStatement
public void rewriteExpressions(ExpressionRewriter expressionRewriter)
rewriteExpressions
in interface StructuredStatement
public boolean isOnlyEmptyDefault()
public boolean isSafeExpression()