public class SwitchStringRewriter extends java.lang.Object implements Op04Rewriter
Modifier and Type | Class and Description |
---|---|
private static class |
SwitchStringRewriter.EmptySwitchStringMatchResultCollector |
private static class |
SwitchStringRewriter.FailedRewriteException |
private static class |
SwitchStringRewriter.SwitchStringMatchResultCollector |
private static class |
SwitchStringRewriter.TooOptimisticMatchException |
Modifier and Type | Field and Description |
---|---|
private BytecodeMeta |
bytecodeMeta |
private ClassFileVersion |
classFileVersion |
private Options |
options |
Constructor and Description |
---|
SwitchStringRewriter(Options options,
ClassFileVersion classFileVersion,
BytecodeMeta bytecodeMeta) |
Modifier and Type | Method and Description |
---|---|
private static java.lang.Integer |
getInt(Expression e) |
private static java.lang.String |
getString(Expression e) |
private static boolean |
isLVOk(Expression lve,
LValue lv,
StructuredStatement assign) |
void |
rewrite(Op04StructuredStatement root) |
private void |
rewriteComplex(java.util.List<StructuredStatement> structuredStatements) |
private void |
rewriteEmpty(java.util.List<StructuredStatement> structuredStatements) |
private StructuredSwitch |
rewriteSwitch(StructuredSwitch original,
SwitchStringRewriter.SwitchStringMatchResultCollector matchResultCollector) |
private final Options options
private final ClassFileVersion classFileVersion
private final BytecodeMeta bytecodeMeta
public SwitchStringRewriter(Options options, ClassFileVersion classFileVersion, BytecodeMeta bytecodeMeta)
public void rewrite(Op04StructuredStatement root)
rewrite
in interface Op04Rewriter
private void rewriteEmpty(java.util.List<StructuredStatement> structuredStatements)
private void rewriteComplex(java.util.List<StructuredStatement> structuredStatements)
private StructuredSwitch rewriteSwitch(StructuredSwitch original, SwitchStringRewriter.SwitchStringMatchResultCollector matchResultCollector)
private static boolean isLVOk(Expression lve, LValue lv, StructuredStatement assign)
private static java.lang.String getString(Expression e)
private static java.lang.Integer getInt(Expression e)