Interface ShadowChainIterator<S,I>
- All Superinterfaces:
Iterator<ShadowChainNode<S,I>>
Iterates up a
ShadowChain chain to find a given name. This
can be used to find all shadowed declarations for a given name, or to
find the reason why a declaration is in scope getScopeTag().-
Method Summary
Methods inherited from interface java.util.Iterator
forEachRemaining, remove
-
Method Details
-
hasNext
boolean hasNext() -
next
ShadowChainNode<S,I> next()Returns the next node in the chain that contains a declaration for the name this iterator searches. If that group exists (hasNext()) then the symbols yielded bygetResults()are shadowed in the previous groups that were yielded (unless they are the same symbols, in which case there could be eg duplicate imports). -
getScopeTag
I getScopeTag()Returns the scope tag of the shadow group that was last yielded.- Throws:
IllegalStateException- Ifnext()has not been called
-
getResults
Returns the results of the search at the point the iterator is stopped. This list is nonempty.Note that a shadow chain iterator considers results node by node, it won't ask the next nodes in the tree.- Throws:
IllegalStateException- Ifnext()has not been called
-