Class TryWithResourcesProcessor
- java.lang.Object
-
- org.jetbrains.java.decompiler.modules.decompiler.TryWithResourcesProcessor
-
public final class TryWithResourcesProcessor extends java.lang.ObjectProcesses try catch statements to turns them into try-with-resources statements wherever possible. Including the entire classpath is generally needed for this to work as it needs to know which classes implement AutoCloseable.
-
-
Constructor Summary
Constructors Constructor Description TryWithResourcesProcessor()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static voidfindEdgesLeaving(Statement curr, Statement check, java.util.Set<StatEdge> edges)static voidfindEdgesLeaving(Statement curr, Statement check, java.util.Set<StatEdge> edges, boolean allowExit)static booleanmakeTryWithResource(CatchAllStatement finallyStat)static booleanmakeTryWithResourceJ11(CatchStatement tryStatement)
-
-
-
Method Detail
-
makeTryWithResource
public static boolean makeTryWithResource(CatchAllStatement finallyStat)
-
makeTryWithResourceJ11
public static boolean makeTryWithResourceJ11(CatchStatement tryStatement)
-
findEdgesLeaving
public static void findEdgesLeaving(Statement curr, Statement check, java.util.Set<StatEdge> edges)
-
-