Class AssertRewriter.SwitchAssertUseCollector
java.lang.Object
org.benf.cfr.reader.bytecode.analysis.opgraph.op4rewriters.matchutil.AbstractMatchResultIterator
org.benf.cfr.reader.bytecode.analysis.opgraph.op4rewriters.AssertRewriter.SwitchAssertUseCollector
- All Implemented Interfaces:
MatchResultCollector
- Enclosing class:
- AssertRewriter
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
void
collectStatement
(String name, StructuredStatement statement) private SwitchExpression.Branch
getBranch
(BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Map<Op04StructuredStatement, StructuredExpressionYield> replacements, Op04StructuredStatement statement, boolean addYieldTrue) private boolean
getBranches
(BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Block swBodyBlock, List<SwitchExpression.Branch> branches, Map<Op04StructuredStatement, StructuredExpressionYield> replacements, boolean addYieldTrue) private Pair<Boolean,
Expression> private StructuredStatement
processSwitchAndThrow
(StructuredStatement ifStm, BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Block swBodyBlock, StructuredSwitch struSwi, Op04StructuredStatement throwStm) private StructuredStatement
processSwitchEmbeddedThrow
(StructuredStatement ifStm, BlockIdentifier outer, Block swBodyBlock, Op04StructuredStatement switchStm, StructuredSwitch struSwi) private List<Op04StructuredStatement>
tryCombineSwitch
(List<Op04StructuredStatement> content, BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Block swBodyBlock) Methods inherited from class org.benf.cfr.reader.bytecode.analysis.opgraph.op4rewriters.matchutil.AbstractMatchResultIterator
collectMatches
-
Constructor Details
-
SwitchAssertUseCollector
private SwitchAssertUseCollector()
-
-
Method Details
-
clear
public void clear()- Specified by:
clear
in interfaceMatchResultCollector
- Overrides:
clear
in classAbstractMatchResultIterator
-
collectStatement
- Specified by:
collectStatement
in interfaceMatchResultCollector
- Overrides:
collectStatement
in classAbstractMatchResultIterator
-
tryCombineSwitch
private List<Op04StructuredStatement> tryCombineSwitch(List<Op04StructuredStatement> content, BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Block swBodyBlock) -
getThrowExpression
-
processSwitchAndThrow
private StructuredStatement processSwitchAndThrow(StructuredStatement ifStm, BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Block swBodyBlock, StructuredSwitch struSwi, Op04StructuredStatement throwStm) -
getBranches
private boolean getBranches(BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Block swBodyBlock, List<SwitchExpression.Branch> branches, Map<Op04StructuredStatement, StructuredExpressionYield> replacements, boolean addYieldTrue) -
getBranch
private SwitchExpression.Branch getBranch(BlockIdentifier outer, BlockIdentifier swiBlockIdentifier, Map<Op04StructuredStatement, StructuredExpressionYield> replacements, Op04StructuredStatement statement, boolean addYieldTrue) -
processSwitchEmbeddedThrow
private StructuredStatement processSwitchEmbeddedThrow(StructuredStatement ifStm, BlockIdentifier outer, Block swBodyBlock, Op04StructuredStatement switchStm, StructuredSwitch struSwi)
-