@TypeQualifiers(value={Regex.class,PartialRegex.class,RegexBottom.class,Unqualified.class,PolyRegex.class,PolyAll.class}) public class RegexChecker extends BaseTypeChecker
Regex
qualifier that finds
syntactically invalid regular expressions.SourceChecker.CheckerError
Modifier and Type | Field and Description |
---|---|
protected AnnotationMirror |
PARTIALREGEX |
protected AnnotationMirror |
REGEX |
protected AnnotationMirror |
REGEXBOTTOM |
protected ExecutableElement |
regexValueElement |
currentPath, currentRoot, DETAILS_SEPARATOR, 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(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(@Regex 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
createSupportedLintOptions, errorAbort, errorAbort, formatStackTrace, fullMessageOf, getLintOption, getLintOption, getMessages, getProcessingEnvironment, getProperties, getSupportedAnnotationTypes, getSupportedOptions, getSupportedSourceVersion, getSuppressWarningsKey, message, printStats, report, setLintOption, setSupportedLintOptions, shouldAddShutdownHook, shouldSkipDefs, shouldSkipDefs, shouldSkipUses, shutdownHook, typeProcess, typeProcessingStart
init, process, typeProcessingOver
getCompletions, isInitialized, toString
protected AnnotationMirror REGEX
protected AnnotationMirror REGEXBOTTOM
protected AnnotationMirror PARTIALREGEX
protected 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(AnnotationMirror anno)