Class AstVisitor

  • Direct Known Subclasses:
    TransformingVisitor

    public abstract class AstVisitor
    extends Object
    A visitor over an AST tree. While this class is abstract it doesn't require any methods to be implemented. The tree is traversed automatically by default, sub-classes can override this behaviour if they need to.
    Author:
    Matt Nathan
    • Constructor Detail

      • AstVisitor

        public AstVisitor()
    • Method Detail

      • visitFields

        public void visitFields​(Fields fields)
      • beforeFieldsNext

        protected boolean beforeFieldsNext​(Fields fields)
        Called before the right hand side of a Fields node is visited. Return false to stop processing of that node.
      • visitPath

        public void visitPath​(Path path)
      • beforePathField

        protected boolean beforePathField​(Path path)
        Called before the suffix part of a Path node is visited. Return false to stop processing.
      • visitSubSelection

        public void visitSubSelection​(SubSelection subSelection)
      • beforeSubSelectionFields

        protected boolean beforeSubSelectionFields​(SubSelection subSelection)
        Called before the fields part of a SubSelection is visited. Return false to stop processing.
      • afterSubSelectionFields

        protected void afterSubSelectionFields​(SubSelection subSelection)
        Called after the fields part of a SubSelection is visited.
      • visitWildcard

        public void visitWildcard​(Wildcard wildcard)
      • visitWord

        public void visitWord​(Word word)