Package org.sonar.java.regex.ast
Class UnicodeCodePointTree
- java.lang.Object
-
- org.sonar.java.regex.ast.RegexSyntaxElement
-
- org.sonar.java.regex.ast.RegexTree
-
- org.sonar.java.regex.ast.CharacterTree
-
- org.sonar.java.regex.ast.UnicodeCodePointTree
-
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
-
-
Constructor Summary
Constructors Constructor Description UnicodeCodePointTree(RegexSource source, IndexRange range, int codePoint)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
accept(RegexVisitor visitor)
This method should only be called by RegexBaseVisitor (or other implementations of the RegexVisitor interface).String
characterAsString()
int
codePointOrUnit()
boolean
isEscapeSequence()
RegexTree.Kind
kind()
-
Methods inherited from class org.sonar.java.regex.ast.RegexSyntaxElement
getLocations, getRange, getSource, getText
-
-
-
-
Constructor Detail
-
UnicodeCodePointTree
public UnicodeCodePointTree(RegexSource source, IndexRange range, int codePoint)
-
-
Method Detail
-
codePointOrUnit
public int codePointOrUnit()
- Specified by:
codePointOrUnit
in classCharacterTree
-
isEscapeSequence
public boolean isEscapeSequence()
- Specified by:
isEscapeSequence
in classCharacterTree
-
characterAsString
public String characterAsString()
- Specified by:
characterAsString
in classCharacterTree
-
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.
-
kind
public RegexTree.Kind kind()
-
-