@Test public void testRewind() { DefaultJavadocTokenStream stream = stream("blank-lines.txt"); stream.mark(); assertEquals("a", stream.nextToken().getText()); stream.mark(); assertEquals("b", stream.nextToken().getText()); stream.rewind(); assertEquals("b", stream.nextToken().getText()); stream.rewind(); assertEquals("a", stream.nextToken().getText()); try { stream.rewind(); fail(); } catch (IllegalStateException e) { } }
@Override public void rewind() { int mark = fetchMark(); scanner.seek(mark); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void rewind() { int mark = fetchMark(); scanner.seek(mark); } }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void rewind() { int mark = fetchMark(); scanner.seek(mark); } DefaultJavadocTokenStream(JavadocScanner scanner); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void rewind() { int mark = fetchMark(); scanner.seek(mark); } DefaultJavadocTokenStream(JavadocScanner scanner); @Override JavadocToken peek(); @Override JavadocToken lookahead(int k); @Override JavadocToken nextToken(); @Override void mark(); @Override void rewind(); @Override void discard(); }
DefaultJavadocTokenStream implements JavadocTokenStream { @Override public void rewind() { int mark = fetchMark(); scanner.seek(mark); } DefaultJavadocTokenStream(JavadocScanner scanner); @Override JavadocToken peek(); @Override JavadocToken lookahead(int k); @Override JavadocToken nextToken(); @Override void mark(); @Override void rewind(); @Override void discard();  }