public class DeleteVisitor extends DepthFirstTraversalRegexASTVisitor
RegexAST fields when removing parts of the
AST.
Nodes can be removed from the AST simply by mutating the parent/child pointers. However, there
are some cached values stored in RegexAST which would no longer have valid values. The
DeleteVisitor is something you can run on nodes that you are removing from the AST in
order to update the relevant fields of RegexAST.
| Constructor and Description |
|---|
DeleteVisitor(RegexAST ast) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
visit(BackReference backReference) |
protected void |
visit(CharacterClass characterClass) |
protected void |
visit(Group group) |
protected void |
visit(LookAheadAssertion assertion) |
protected void |
visit(LookBehindAssertion assertion) |
protected void |
visit(MatchFound matchFound) |
protected void |
visit(PositionAssertion assertion) |
protected void |
visit(Sequence sequence) |
init, isReverse, leave, leave, leave, leave, run, runReversedoLeave, doVisitpublic DeleteVisitor(RegexAST ast)
protected void visit(BackReference backReference)
visit in class DepthFirstTraversalRegexASTVisitorprotected void visit(Group group)
visit in class DepthFirstTraversalRegexASTVisitorprotected void visit(Sequence sequence)
visit in class DepthFirstTraversalRegexASTVisitorprotected void visit(PositionAssertion assertion)
visit in class DepthFirstTraversalRegexASTVisitorprotected void visit(LookBehindAssertion assertion)
visit in class DepthFirstTraversalRegexASTVisitorprotected void visit(LookAheadAssertion assertion)
visit in class DepthFirstTraversalRegexASTVisitorprotected void visit(CharacterClass characterClass)
visit in class DepthFirstTraversalRegexASTVisitorprotected void visit(MatchFound matchFound)
visit in class DepthFirstTraversalRegexASTVisitor