@Override public Description matchSwitch(SwitchTree tree, VisitorState state) { PeekingIterator<JCTree.JCCase> it = Iterators.peekingIterator(((JCTree.JCSwitch) tree).cases.iterator()); while (it.hasNext()) { JCTree.JCCase caseTree = it.next();
@Override public <T extends JCTree> List<T> copy(List<T> originals, Void p) { List<T> copies = super.copy(originals, p); if (originals != null) { Iterator<T> it1 = originals.iterator(); Iterator<T> it2 = copies.iterator(); while (it1.hasNext()) originalToCopy.put(it1.next(), it2.next()); } return copies; }
try { Processor processor = PrintingProcessor.class.newInstance(); processorIterator = List.of(processor).iterator(); } catch (Throwable t) { AssertionError assertError =
try { Processor processor = PrintingProcessor.class.newInstance(); processorIterator = List.of(processor).iterator(); } catch (Throwable t) { AssertionError assertError =
@Override public Description matchSwitch(SwitchTree tree, VisitorState state) { PeekingIterator<JCTree.JCCase> it = Iterators.peekingIterator(((JCTree.JCSwitch) tree).cases.iterator()); while (it.hasNext()) { JCTree.JCCase caseTree = it.next();
try { Processor processor = PrintingProcessor.class.newInstance(); processorIterator = List.of(processor).iterator(); } catch (Throwable t) { AssertionError assertError =
@Override public void visitTry(JCTry tree) { print("try"); if (!tree.getResources().isEmpty()) { print(" ("); //XXX: space should be according to the code style! for (Iterator<? extends JCTree> it = tree.getResources().iterator(); it.hasNext();) { JCTree r = it.next(); //XXX: disabling copying of original text, as the ending ';' needs to be removed in some cases. oldTrees.remove(r); printPrecedingComments(r, false); printExpr(r, 0); printTrailingComments(r, false); if (it.hasNext()) print(";"); } print(") "); //XXX: space should be according to the code style! } printBlock(tree.body, cs.getOtherBracePlacement(), cs.spaceBeforeTryLeftBrace()); for (List < JCCatch > l = tree.catchers; l.nonEmpty(); l = l.tail) printStat(l.head); if (tree.finalizer != null) { printFinallyBlock(tree.finalizer); } }
try { Processor processor = PrintingProcessor.class.newInstance(); processorIterator = List.of(processor).iterator(); } catch (Throwable t) { AssertionError assertError =
insertHint = oldT.implementing.iterator().next().getStartPosition();
} else { posHint = oldT.params.iterator().next().getStartPosition();