Class AstVisitor
- java.lang.Object
-
- com.pressassociation.pr.ast.visitor.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 Summary
Constructors Constructor Description AstVisitor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected voidafterSubSelectionFields(SubSelection subSelection)Called after the fields part of a SubSelection is visited.protected booleanbeforeFieldsNext(Fields fields)Called before the right hand side of a Fields node is visited.protected booleanbeforePathField(Path path)Called before the suffix part of a Path node is visited.protected booleanbeforeSubSelectionFields(SubSelection subSelection)Called before the fields part of a SubSelection is visited.voidvisitFields(Fields fields)voidvisitPath(Path path)voidvisitSubSelection(SubSelection subSelection)voidvisitWildcard(Wildcard wildcard)voidvisitWord(Word word)
-
-
-
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)
-
-