Class MatchesPathVisitor
- java.lang.Object
-
- com.pressassociation.pr.ast.visitor.AstVisitor
-
- com.pressassociation.pr.ast.visitor.TransformingVisitor<Boolean>
-
- com.pressassociation.pr.ast.visitor.MatchesPathVisitor
-
public class MatchesPathVisitor extends TransformingVisitor<Boolean>
Visitor that will return a boolean to signify whether the path given in the constructor matches the Ast we visit.- Author:
- Matt Nathan
-
-
Constructor Summary
Constructors Constructor Description MatchesPathVisitor(Iterable<String> pathParts)
-
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.BooleangetResult()Return the result of visiting the AST.voidvisitWildcard(Wildcard wildcard)voidvisitWord(Word word)-
Methods inherited from class com.pressassociation.pr.ast.visitor.TransformingVisitor
applyTo, toString
-
Methods inherited from class com.pressassociation.pr.ast.visitor.AstVisitor
visitFields, visitPath, visitSubSelection
-
-
-
-
Method Detail
-
beforeFieldsNext
protected boolean beforeFieldsNext(Fields fields)
Description copied from class:AstVisitorCalled before the right hand side of a Fields node is visited. Return false to stop processing of that node.- Overrides:
beforeFieldsNextin classAstVisitor
-
beforePathField
protected boolean beforePathField(Path path)
Description copied from class:AstVisitorCalled before the suffix part of a Path node is visited. Return false to stop processing.- Overrides:
beforePathFieldin classAstVisitor
-
beforeSubSelectionFields
protected boolean beforeSubSelectionFields(SubSelection subSelection)
Description copied from class:AstVisitorCalled before the fields part of a SubSelection is visited. Return false to stop processing.- Overrides:
beforeSubSelectionFieldsin classAstVisitor
-
afterSubSelectionFields
protected void afterSubSelectionFields(SubSelection subSelection)
Description copied from class:AstVisitorCalled after the fields part of a SubSelection is visited.- Overrides:
afterSubSelectionFieldsin classAstVisitor
-
visitWildcard
public void visitWildcard(Wildcard wildcard)
- Overrides:
visitWildcardin classAstVisitor
-
visitWord
public void visitWord(Word word)
- Overrides:
visitWordin classAstVisitor
-
getResult
public Boolean getResult()
Description copied from class:TransformingVisitorReturn the result of visiting the AST.- Specified by:
getResultin classTransformingVisitor<Boolean>
-
-