Package org.sonar.java.regex.ast
Class UnicodeCodePointTree
- java.lang.Object
-
- org.sonar.java.regex.ast.AbstractRegexSyntaxElement
-
- org.sonar.java.regex.ast.RegexTree
-
- org.sonar.java.regex.ast.CharacterTree
-
- org.sonar.java.regex.ast.UnicodeCodePointTree
-
- All Implemented Interfaces:
AutomatonState,CharacterClassElementTree,RegexSyntaxElement
public class UnicodeCodePointTree extends CharacterTree
Represents the \\x{N...N} sequence in a regular expression, which specifies a single Unicode code point. This differs from PlainCharacterTree in that it will match a single code point even if it consists of multiple multiple UTF-16 code units (i.e. multiple Java chars).
-
-
Nested Class Summary
-
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
-
Nested classes/interfaces inherited from interface org.sonar.java.regex.ast.CharacterClassElementTree
CharacterClassElementTree.Kind
-
-
Constructor Summary
Constructors Constructor Description UnicodeCodePointTree(RegexSource source, IndexRange range, int codePoint, FlagSet activeFlags)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(RegexVisitor visitor)This method should only be called by RegexBaseVisitor (or other implementations of the RegexVisitor interface).StringcharacterAsString()CharacterClassElementTree.KindcharacterClassElementKind()intcodePointOrUnit()booleanisEscapeSequence()RegexTree.Kindkind()-
Methods inherited from class org.sonar.java.regex.ast.CharacterTree
incomingTransitionType
-
Methods inherited from class org.sonar.java.regex.ast.RegexTree
activeFlags, continuation, is, setContinuation
-
Methods inherited from class org.sonar.java.regex.ast.AbstractRegexSyntaxElement
getLocations, getRange, getSource, getText
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.sonar.java.regex.ast.AutomatonState
successors
-
Methods inherited from interface org.sonar.java.regex.ast.CharacterClassElementTree
activeFlags, is
-
Methods inherited from interface org.sonar.java.regex.ast.RegexSyntaxElement
getLocations, getRange, getSource, getText
-
-
-
-
Constructor Detail
-
UnicodeCodePointTree
public UnicodeCodePointTree(RegexSource source, IndexRange range, int codePoint, FlagSet activeFlags)
-
-
Method Detail
-
codePointOrUnit
public int codePointOrUnit()
- Specified by:
codePointOrUnitin classCharacterTree
-
isEscapeSequence
public boolean isEscapeSequence()
- Specified by:
isEscapeSequencein classCharacterTree
-
characterAsString
public String characterAsString()
- Specified by:
characterAsStringin classCharacterTree
-
accept
public void accept(RegexVisitor visitor)
Description copied from class:RegexTreeThis 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.- Specified by:
acceptin interfaceCharacterClassElementTree- Specified by:
acceptin classRegexTree
-
kind
public RegexTree.Kind kind()
-
characterClassElementKind
@Nonnull public CharacterClassElementTree.Kind characterClassElementKind()
-
-