Class TryWithResourcesProcessor


  • public final class TryWithResourcesProcessor
    extends java.lang.Object
    Processes 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 Detail

      • TryWithResourcesProcessor

        public TryWithResourcesProcessor()
    • 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,
                                            boolean allowExit)