public class RegexChecker extends BaseTypeChecker
Regex
qualifier that finds
syntactically invalid regular expressions.SourceChecker.CheckerError
Modifier and Type | Field and Description |
---|---|
protected @Nullable AnnotationMirror |
PARTIALREGEX |
protected @Nullable AnnotationMirror |
REGEX |
protected @NonNull ExecutableElement |
regexValueElement |
currentPath, currentRoot, messager, messages, trees
processingEnv
Constructor and Description |
---|
RegexChecker() |
Modifier and Type | Method and Description |
---|---|
QualifierHierarchy |
createQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory)
Gets a TypeMirror for the given class name.
|
int |
getGroupCount(@Nullable AnnotationMirror anno)
Returns the group count value of the given annotation or 0 if
there's a problem getting the group count value.
|
int |
getGroupCount(@ReadOnly String regex)
Returns the number of groups in the given regex String.
|
void |
initChecker()
Initialize the checker.
|
createFactory, createQualifierHierarchy, createQualifierHierarchyFactory, createSourceVisitor, createSupportedTypeQualifiers, createTypeHierarchy, getQualifierHierarchy, getSupportedLintOptions, getSupportedTypeQualifiers, getTypeHierarchy, invokeConstructorFor
errorAbort, errorAbort, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getProperties, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, message, report, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, typeProcess, typeProcessingStart
init, process, typeProcessingOver
getCompletions, isInitialized, toString
protected @Nullable AnnotationMirror REGEX
protected @Nullable AnnotationMirror PARTIALREGEX
protected @NonNull ExecutableElement regexValueElement
public void initChecker()
SourceChecker
initChecker
in class BaseTypeChecker
AbstractProcessor.init(ProcessingEnvironment)
public QualifierHierarchy createQualifierHierarchy(MultiGraphQualifierHierarchy.MultiGraphFactory factory)
createQualifierHierarchy
in class BaseTypeChecker
public int getGroupCount(@Nullable AnnotationMirror anno)