mirror of
https://github.com/openjdk/jdk.git
synced 2025-09-21 11:34:38 +02:00
6843077: JSR 308: Annotations on types
Co-authored-by: Mahmood Ali <mali@csail.mit.edu> Co-authored-by: Matt Papi <mpapi@csail.mit.edu> Reviewed-by: jjg, mcimadamore, darcy
This commit is contained in:
parent
2b12b62ad4
commit
5a1465b9de
45 changed files with 1856 additions and 98 deletions
|
@ -120,19 +120,20 @@ public class TreePath implements Iterable<Tree> {
|
|||
public Iterator<Tree> iterator() {
|
||||
return new Iterator<Tree>() {
|
||||
public boolean hasNext() {
|
||||
return curr.parent != null;
|
||||
return next != null;
|
||||
}
|
||||
|
||||
public Tree next() {
|
||||
curr = curr.parent;
|
||||
return curr.leaf;
|
||||
Tree t = next.leaf;
|
||||
next = next.parent;
|
||||
return t;
|
||||
}
|
||||
|
||||
public void remove() {
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
private TreePath curr;
|
||||
private TreePath next = TreePath.this;
|
||||
};
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue