public class CheckUtils extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static java.util.EnumSet<ETokenType> |
BOOLEAN_OPERATOR_TYPES
Boolean operator types.
|
static java.util.EnumSet<ETokenType> |
STRING_LITERALS
String and character literal types.
|
| Constructor and Description |
|---|
CheckUtils() |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildIdentifier(java.lang.String categoryName,
java.lang.String groupName,
java.lang.String name)
Constructs a unique identifier out of the given group name and name.
|
static java.util.regex.Pattern |
compilePatternFromCheckOptionRegex(java.lang.String regex,
java.lang.String checkName,
java.lang.String optionName)
Compiles a
Pattern from the given regular expression string. |
static java.lang.String |
getUnquotedTextForCharacterLiteral(IToken token)
Gets the text of an character/string literal token without quotes.
|
public static final java.util.EnumSet<ETokenType> BOOLEAN_OPERATOR_TYPES
public static final java.util.EnumSet<ETokenType> STRING_LITERALS
public CheckUtils()
public static java.lang.String buildIdentifier(java.lang.String categoryName, java.lang.String groupName, java.lang.String name)
public static java.lang.String getUnquotedTextForCharacterLiteral(IToken token)
null if token is not of
type ETokenType.CHARACTER_LITERALpublic static java.util.regex.Pattern compilePatternFromCheckOptionRegex(java.lang.String regex, java.lang.String checkName, java.lang.String optionName) throws CheckException
Pattern from the given regular expression string. In case
of a PatternSyntaxException the exception is wrapped in a
CheckException with an appropriate message containing the check name
and the option name.Pattern or null if the given regex
was emptyCheckException - if a PatternSyntaxException occurs during compiling