public class RegexAnnotatedTypeFactory extends BasicAnnotatedTypeFactory<RegexChecker>
Regex
to the type of tree, in the following cases:
String
or char
literal that is a valid
regular expressionString
or char
) or two partial regular expression
values that make a valid regular expression when concatenated.@Regex String
with the same group count as the second argument to the
call to asRegex.PartialRegex
is added
to the type of tree in the following cases:
PolyRegex
to the type of String/char concatenation of
a Regex and a PolyRegex or two PolyRegexs.AnnotatedTypeFactory.InheritedFromClassAnnotator
checker, defaults, flow, FLOW_BY_DEFAULT, poly, treeAnnotator, typeAnnotator, useFlow
annotations, atypes, elements, env, fromTreeCache, qualHierarchy, root, trees, types, uid, visitorState
Constructor and Description |
---|
RegexAnnotatedTypeFactory(RegexChecker checker,
@Nullable CompilationUnitTree root) |
Modifier and Type | Method and Description |
---|---|
Flow |
createFlow(RegexChecker checker,
@Nullable CompilationUnitTree tree,
Set<@Nullable AnnotationMirror> flowQuals)
Returns a
Flow instance that performs flow sensitive analysis
to infer qualifiers on unqualified types. |
TreeAnnotator |
createTreeAnnotator(RegexChecker checker)
Returns a
TreeAnnotator that adds annotations to a type based
on the contents of a tree. |
annotateImplicit, annotateImplicit, annotateImplicit, constructorFromUse, createFlowQualifiers, createTypeAnnotator, getDefaultedAnnotatedType, methodFromUse, postDirectSuperTypes, postInit
addAliasedAnnotation, aliasedAnnotation, annotateInheritedFromClass, canHaveAnnotatedTypeParameters, createLRUCache, declarationFromElement, fromClass, fromElement, fromElement, fromElement, fromExpression, fromMember, fromNewClass, fromTypeTree, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFromTypeTree, getBoxedType, getCurrentClassTree, getCurrentClassType, getCurrentMethodReceiver, getDeclAnnotation, getEnclosingType, getImplicitReceiverType, getPath, getQualifierHierarchy, getReceiverType, getSelfType, getUnboxedType, getVisitorState, isAnyEnclosingThisDeref, isMostEnclosingThisDeref, isSupportedQualifier, isWithinConstructor, postAsMemberOf, toAnnotatedType, toString, typeVariablesFromUse, unify
public RegexAnnotatedTypeFactory(RegexChecker checker, @Nullable CompilationUnitTree root)
public Flow createFlow(RegexChecker checker, @Nullable CompilationUnitTree tree, Set<@Nullable AnnotationMirror> flowQuals)
BasicAnnotatedTypeFactory
Flow
instance that performs flow sensitive analysis
to infer qualifiers on unqualified types.createFlow
in class BasicAnnotatedTypeFactory<RegexChecker>
checker
- the checkertree
- the compilation unit associated with this factoryflowQuals
- the qualifiers to inferpublic TreeAnnotator createTreeAnnotator(RegexChecker checker)
BasicAnnotatedTypeFactory
TreeAnnotator
that adds annotations to a type based
on the contents of a tree.
Subclasses may override this method to specify more appriopriate
TreeAnnotator
createTreeAnnotator
in class BasicAnnotatedTypeFactory<RegexChecker>