Class SubgraphWalker.ScopedWalker

  • Enclosing class:
    SubgraphWalker

    public static class SubgraphWalker.ScopedWalker
    extends java.lang.Object
    Handles declaration scope monitoring for iterative traversals. If this is not required, use SubgraphWalker.IterativeGraphWalker for less overhead.

    Declaration scopes are similar to ScopeManager scopes: ValueDeclarations located inside a scope (i.e. are children of the scope root) are visible to any children of the scope root. Scopes can be layered, where declarations from parent scopes are visible to the children but not the other way around.

    • Constructor Detail

      • ScopedWalker

        public ScopedWalker()
    • Method Detail

      • clearCallbacks

        public void clearCallbacks()
      • registerHandler

        public void registerHandler​(java.util.function.BiConsumer<Node,​RecordDeclaration> handler)
      • collectDeclarations

        public void collectDeclarations​(Node current)
      • getAllDeclarationsForScope

        public java.util.List<ValueDeclaration> getAllDeclarationsForScope​(Node scope)
      • getDeclarationForScope

        public java.util.Optional<? extends ValueDeclaration> getDeclarationForScope​(Node scope,
                                                                                     java.lang.String name)