Class SwitchHelper
- java.lang.Object
-
- org.jetbrains.java.decompiler.modules.decompiler.SwitchHelper
-
public final class SwitchHelper extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static intSTATIC_FINAL_SYNTHETIC
-
Constructor Summary
Constructors Constructor Description SwitchHelper()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static <T extends Exprent>
voidfindExprents(Statement start, java.lang.Class<? extends T> exprClass, java.util.function.Predicate<T> predicate, boolean onlyOneStat, java.util.function.BiConsumer<Statement,T> consumer)Recursively searches one statement for matching exprents.static booleansimplifySwitches(Statement stat, StructMethod mt, RootStatement root)
-
-
-
Field Detail
-
STATIC_FINAL_SYNTHETIC
public static final int STATIC_FINAL_SYNTHETIC
- See Also:
- Constant Field Values
-
-
Method Detail
-
simplifySwitches
public static boolean simplifySwitches(Statement stat, StructMethod mt, RootStatement root)
-
findExprents
public static <T extends Exprent> void findExprents(Statement start, java.lang.Class<? extends T> exprClass, java.util.function.Predicate<T> predicate, boolean onlyOneStat, java.util.function.BiConsumer<Statement,T> consumer)
Recursively searches one statement for matching exprents.- Parameters:
start- the statement to searchexprClass- the wanted exprent typepredicate- a predicate for filtering the exprentsonlyOneStat- if true, will return eagerly after the first matching statementconsumer- the consumer that receives the exprents and their parent statements
-
-