@Test void try_statement_with_runtime_exceptions() { CFG cfg = buildCFG(new File("src/test/files/cfg/CFGRuntimeExceptions.java")); CFGChecker cfgChecker = checker( block( element(Tree.Kind.TRY_STATEMENT)).successors(9), block( element(Tree.Kind.IDENTIFIER, "doSomething"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(8, 7, 6, 5, 4, 3, 2, 0), block( element(Tree.Kind.VARIABLE, "re"), element(Tree.Kind.IDENTIFIER, "doSomethingElse"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock(), block( element(Tree.Kind.VARIABLE, "mre"), element(Tree.Kind.IDENTIFIER, "doSomethingElse"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock(), block( element(Tree.Kind.VARIABLE, "er"), element(Tree.Kind.IDENTIFIER, "doSomethingElse"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock(), block( element(Tree.Kind.VARIABLE, "mer"), element(Tree.Kind.IDENTIFIER, "doSomethingElse"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock(), block( element(Tree.Kind.VARIABLE, "t"), element(Tree.Kind.IDENTIFIER, "doSomethingElse"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock(), block( element(Tree.Kind.VARIABLE, "mt"), element(Tree.Kind.IDENTIFIER, "doSomethingElse"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock(), block( element(Tree.Kind.VARIABLE, "ex"), element(Tree.Kind.IDENTIFIER, "doSomethingElse"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock(), block( element(Tree.Kind.VARIABLE, "mex"), element(Tree.Kind.IDENTIFIER, "doNothing"), element(Tree.Kind.METHOD_INVOCATION)).successors(0).exceptions(0).isCatchBlock()); cfgChecker.check(cfg); }
public static CFG buildCFG(List<? extends Tree> trees, boolean ignoreBreak) { return new CFG(trees, null, ignoreBreak); }
CFG implements ControlFlowGraph { public static CFG buildCFG(List<? extends Tree> trees, boolean ignoreBreak) { return new CFG(trees, null, ignoreBreak); } }
CFG implements ControlFlowGraph { public static CFG buildCFG(List<? extends Tree> trees, boolean ignoreBreak) { return new CFG(trees, null, ignoreBreak); } private  CFG(List<? extends Tree> trees, @Nullable Symbol.MethodSymbol symbol, boolean ignoreBreakAndContinue); }
CFG implements ControlFlowGraph { public static CFG buildCFG(List<? extends Tree> trees, boolean ignoreBreak) { return new CFG(trees, null, ignoreBreak); } private  CFG(List<? extends Tree> trees, @Nullable Symbol.MethodSymbol symbol, boolean ignoreBreakAndContinue); @Override Block exitBlock(); @Nullable Symbol.MethodSymbol methodSymbol(); @Override Block entryBlock(); @Override List<Block> blocks(); List<Block> reversedBlocks(); static CFG buildCFG(List<? extends Tree> trees, boolean ignoreBreak); static CFG buildCFG(List<? extends Tree> trees); static CFG build(MethodTree tree); void setMethodSymbol(Symbol.MethodSymbol methodSymbol); }
CFG implements ControlFlowGraph { public static CFG buildCFG(List<? extends Tree> trees, boolean ignoreBreak) { return new CFG(trees, null, ignoreBreak); } private  CFG(List<? extends Tree> trees, @Nullable Symbol.MethodSymbol symbol, boolean ignoreBreakAndContinue); @Override Block exitBlock(); @Nullable Symbol.MethodSymbol methodSymbol(); @Override Block entryBlock(); @Override List<Block> blocks(); List<Block> reversedBlocks(); static CFG buildCFG(List<? extends Tree> trees, boolean ignoreBreak); static CFG buildCFG(List<? extends Tree> trees); static CFG build(MethodTree tree); void setMethodSymbol(Symbol.MethodSymbol methodSymbol);  }