Package org.sonar.java.regex.ast
Class LookAroundTree
- java.lang.Object
-
- org.sonar.java.regex.ast.AbstractRegexSyntaxElement
-
- org.sonar.java.regex.ast.RegexTree
-
- org.sonar.java.regex.ast.GroupTree
-
- org.sonar.java.regex.ast.LookAroundTree
-
- All Implemented Interfaces:
AutomatonState
,RegexSyntaxElement
public class LookAroundTree extends GroupTree
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
LookAroundTree.Direction
static class
LookAroundTree.Polarity
-
Nested classes/interfaces inherited from class org.sonar.java.regex.ast.RegexTree
RegexTree.Kind
-
Nested classes/interfaces inherited from interface org.sonar.java.regex.ast.AutomatonState
AutomatonState.TransitionType
-
-
Constructor Summary
Constructors Constructor Description LookAroundTree(RegexSource source, IndexRange range, LookAroundTree.Polarity polarity, LookAroundTree.Direction direction, RegexTree element, FlagSet activeFlags)
-
Method Summary
-
Methods inherited from class org.sonar.java.regex.ast.GroupTree
getGroupHeader, kind, setContinuation
-
Methods inherited from class org.sonar.java.regex.ast.RegexTree
activeFlags, continuation, is
-
Methods inherited from class org.sonar.java.regex.ast.AbstractRegexSyntaxElement
getRange, getSource, getText
-
-
-
-
Constructor Detail
-
LookAroundTree
public LookAroundTree(RegexSource source, IndexRange range, LookAroundTree.Polarity polarity, LookAroundTree.Direction direction, RegexTree element, FlagSet activeFlags)
-
-
Method Detail
-
getPolarity
public LookAroundTree.Polarity getPolarity()
-
getDirection
public LookAroundTree.Direction getDirection()
-
accept
public void accept(RegexVisitor visitor)
Description copied from class:RegexTree
This method should only be called by RegexBaseVisitor (or other implementations of the RegexVisitor interface). Do not call this method to invoke a visitor, use visitor.visit(tree) instead.
-
incomingTransitionType
@Nonnull public AutomatonState.TransitionType incomingTransitionType()
- Specified by:
incomingTransitionType
in interfaceAutomatonState
- Overrides:
incomingTransitionType
in classGroupTree
-
getElement
@Nonnull public RegexTree getElement()
Description copied from class:GroupTree
Can only be null for non-capturing groups- Overrides:
getElement
in classGroupTree
-
setContinuation
public void setContinuation(AutomatonState continuation)
- Overrides:
setContinuation
in classGroupTree
-
successors
@Nonnull public List<AutomatonState> successors()
- Specified by:
successors
in interfaceAutomatonState
- Overrides:
successors
in classGroupTree
-
positiveLookAhead
public static LookAroundTree positiveLookAhead(RegexSource source, IndexRange range, RegexTree element, FlagSet activeFlags)
-
negativeLookAhead
public static LookAroundTree negativeLookAhead(RegexSource source, IndexRange range, RegexTree element, FlagSet activeFlags)
-
positiveLookBehind
public static LookAroundTree positiveLookBehind(RegexSource source, IndexRange range, RegexTree element, FlagSet activeFlags)
-
negativeLookBehind
public static LookAroundTree negativeLookBehind(RegexSource source, IndexRange range, RegexTree element, FlagSet activeFlags)
-
-