6473148: TreePath.iterator() should document the iteration order
authorvromero
Fri, 28 Jun 2013 13:20:44 +0100
changeset 18664 5c35de99f6df
parent 18663 c4ebae57a699
child 18665 49867b085faf
6473148: TreePath.iterator() should document the iteration order Reviewed-by: mcimadamore
langtools/src/share/classes/com/sun/source/util/TreePath.java
--- a/langtools/src/share/classes/com/sun/source/util/TreePath.java	Fri Jun 28 06:54:58 2013 -0400
+++ b/langtools/src/share/classes/com/sun/source/util/TreePath.java	Fri Jun 28 13:20:44 2013 +0100
@@ -125,18 +125,25 @@
         return parent;
     }
 
+    /**
+     *  Iterates from leaves to root.
+     */
+    @Override
     public Iterator<Tree> iterator() {
         return new Iterator<Tree>() {
+            @Override
             public boolean hasNext() {
                 return next != null;
             }
 
+            @Override
             public Tree next() {
                 Tree t = next.leaf;
                 next = next.parent;
                 return t;
             }
 
+            @Override
             public void remove() {
                 throw new UnsupportedOperationException();
             }