Class RegexBaseVisitor
- java.lang.Object
-
- org.sonarsource.analyzer.commons.regex.ast.RegexBaseVisitor
-
- All Implemented Interfaces:
RegexVisitor
- Direct Known Subclasses:
AnchorPrecedenceFinder,BranchTrackingVisitor,ComplexRegexFinder,DuplicatesInCharacterClassFinder,EmptyAlternativeFinder,EmptyGroupFinder,EmptyStringRepetitionFinder,GraphemeInClassFinder,ImpossibleBackReferenceFinder,ImpossibleBoundaryFinder,MultipleWhitespaceFinder,RedundantRegexAlternativesFinder,ReluctantQuantifierFinder,ReluctantQuantifierWithEmptyContinuationFinder,SingleCharacterAlternationFinder,SingleCharCharacterClassFinder,SuperfluousCurlyBraceFinder,UnicodeUnawareCharClassFinder,UnquantifiedNonCapturingGroupFinder,VerboseRegexFinder
public class RegexBaseVisitor extends Object implements RegexVisitor
-
-
Constructor Summary
Constructors Constructor Description RegexBaseVisitor()
-
Method Summary
-
-
-
Method Detail
-
visit
public void visit(RegexTree tree)
-
visitInCharClass
public void visitInCharClass(CharacterClassElementTree tree)
-
visit
public void visit(RegexParseResult regexParseResult)
- Specified by:
visitin interfaceRegexVisitor
-
before
protected void before(RegexParseResult regexParseResult)
Override to perform an action before any part of the regex is visited.
-
after
protected void after(RegexParseResult regexParseResult)
Override to perform an action after the entire regex has been visited.
-
visitCharacter
public void visitCharacter(CharacterTree tree)
- Specified by:
visitCharacterin interfaceRegexVisitor
-
visitSequence
public void visitSequence(SequenceTree tree)
- Specified by:
visitSequencein interfaceRegexVisitor
-
visitDisjunction
public void visitDisjunction(DisjunctionTree tree)
- Specified by:
visitDisjunctionin interfaceRegexVisitor
-
visitGroup
public void visitGroup(GroupTree tree)
Description copied from interface:RegexVisitorGeneric for all 4 different kinds of GroupTree(s)- Specified by:
visitGroupin interfaceRegexVisitor
-
visitCapturingGroup
public void visitCapturingGroup(CapturingGroupTree tree)
- Specified by:
visitCapturingGroupin interfaceRegexVisitor
-
visitNonCapturingGroup
public void visitNonCapturingGroup(NonCapturingGroupTree tree)
- Specified by:
visitNonCapturingGroupin interfaceRegexVisitor
-
visitAtomicGroup
public void visitAtomicGroup(AtomicGroupTree tree)
- Specified by:
visitAtomicGroupin interfaceRegexVisitor
-
visitLookAround
public void visitLookAround(LookAroundTree tree)
- Specified by:
visitLookAroundin interfaceRegexVisitor
-
visitBackReference
public void visitBackReference(BackReferenceTree tree)
- Specified by:
visitBackReferencein interfaceRegexVisitor
-
visitRepetition
public void visitRepetition(RepetitionTree tree)
- Specified by:
visitRepetitionin interfaceRegexVisitor
-
visitCharacterClass
public void visitCharacterClass(CharacterClassTree tree)
- Specified by:
visitCharacterClassin interfaceRegexVisitor
-
visitCharacterRange
public void visitCharacterRange(CharacterRangeTree tree)
- Specified by:
visitCharacterRangein interfaceRegexVisitor
-
visitCharacterClassUnion
public void visitCharacterClassUnion(CharacterClassUnionTree tree)
- Specified by:
visitCharacterClassUnionin interfaceRegexVisitor
-
visitCharacterClassIntersection
public void visitCharacterClassIntersection(CharacterClassIntersectionTree tree)
- Specified by:
visitCharacterClassIntersectionin interfaceRegexVisitor
-
visitDot
public void visitDot(DotTree tree)
- Specified by:
visitDotin interfaceRegexVisitor
-
visitEscapedCharacterClass
public void visitEscapedCharacterClass(EscapedCharacterClassTree tree)
- Specified by:
visitEscapedCharacterClassin interfaceRegexVisitor
-
visitBoundary
public void visitBoundary(BoundaryTree boundaryTree)
- Specified by:
visitBoundaryin interfaceRegexVisitor
-
visitMiscEscapeSequence
public void visitMiscEscapeSequence(MiscEscapeSequenceTree tree)
- Specified by:
visitMiscEscapeSequencein interfaceRegexVisitor
-
visitConditionalSubpattern
public void visitConditionalSubpattern(ConditionalSubpatternTree tree)
- Specified by:
visitConditionalSubpatternin interfaceRegexVisitor
-
supportsAnyOfFeatures
protected static boolean supportsAnyOfFeatures(RegexTree tree, RegexFeature... features)
-
-