public class RegexAnnotatedTypeFactory
extends org.checkerframework.common.basetype.BaseAnnotatedTypeFactory
Regex
to the type of tree, in the following cases:
String
or char
literal that is a valid regular expression
String
or
char
) or two partial regular expression values that make a valid regular expression
when concatenated.
@Regex String
gets 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.Modifier and Type | Field and Description |
---|---|
protected AnnotationMirror |
PARTIALREGEX |
protected AnnotationMirror |
POLYREGEX |
protected AnnotationMirror |
REGEX |
protected AnnotationMirror |
REGEXBOTTOM |
protected ExecutableElement |
regexValueElement |
analysis, cfgVisualizer, defaults, dependentTypesHelper, emptyStore, flowByDefault, flowResult, flowResultAnalysisCaches, initializationStaticStore, initializationStore, methodInvocationStores, poly, regularExitStores, returnStatementStores, scannedClasses, transfer, treeAnnotator, typeAnnotator
checker, elements, fromExpressionTreeCache, fromMemberTreeCache, fromTypeTreeCache, ignoreUninferredTypeArguments, loader, processingEnv, qualHierarchy, reflectionResolver, root, shouldCache, trees, typeArgumentInference, typeFormatter, typeHierarchy, types, typeVarSubstitutor, uid, visitorState
Constructor and Description |
---|
RegexAnnotatedTypeFactory(org.checkerframework.common.basetype.BaseTypeChecker checker) |
Modifier and Type | Method and Description |
---|---|
org.checkerframework.framework.flow.CFTransfer |
createFlowTransferFunction(org.checkerframework.framework.flow.CFAbstractAnalysis<org.checkerframework.framework.flow.CFValue,org.checkerframework.framework.flow.CFStore,org.checkerframework.framework.flow.CFTransfer> analysis) |
org.checkerframework.framework.type.QualifierHierarchy |
createQualifierHierarchy(org.checkerframework.framework.util.MultiGraphQualifierHierarchy.MultiGraphFactory factory) |
protected Set<Class<? extends Annotation>> |
createSupportedTypeQualifiers() |
org.checkerframework.framework.type.treeannotator.TreeAnnotator |
createTreeAnnotator() |
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.
|
static int |
getGroupCount(String regex)
Returns the number of groups in the given regex String.
|
createFlowAnalysis
addCheckedCodeDefaults, addCheckedStandardDefaults, addComputedTypeAnnotations, addComputedTypeAnnotations, addComputedTypeAnnotations, addDefaultAnnotations, addTypeNameImplicit, addUncheckedCodeDefaults, addUncheckedStandardDefaults, analyze, applyInferredAnnotations, checkAndPerformFlowAnalysis, checkForDefaultQualifierInHierarchy, constructorFromUse, createAndInitQualifierDefaults, createCFGVisualizer, createDependentTypesHelper, createQualifierDefaults, createQualifierPolymorphism, createTypeAnnotator, fromNewClass, getAnnotatedTypeLhs, getAnnotatedTypeLhsNoTypeVarDefault, getAnnotatedTypeRhsUnaryAssign, getAnnotatedTypeVarargsArray, getAnnotationFromJavaExpressionString, getAnnotationFromReceiver, getAnnotationMirrorFromJavaExpressionString, getCFGVisualizer, getDependentTypesHelper, getEmptyStore, getFinalLocalValues, getFirstNodeOfKindForTree, getInferredValueFor, getMethodReturnType, getMethodReturnType, getNodesForTree, getReceiverFromJavaExpressionString, getRegularExitStore, getResultingTypeOfConstructorMemberReference, getReturnStatementStores, getShouldDefaultTypeVarLocals, getSortedQualifierNames, getStoreAfter, getStoreAfter, getStoreAfter, getStoreBefore, getStoreBefore, getStoreBefore, getSupportedMonotonicTypeQualifiers, getTypeFactoryOfSubchecker, handleCFGViz, methodFromUse, performFlowAnalysis, postDirectSuperTypes, postInit, preProcessClassTree, setRoot, typeVariablesFromUse
adaptGetClassReturnTypeToReceiver, addAliasedAnnotation, addAliasedAnnotation, addAliasedAnnotation, addAliasedAnnotation, addAliasedDeclAnnotation, addAnnotationFromFieldInvariant, addInheritedAnnotation, aliasedAnnotation, annotateInheritedFromClass, annotateInheritedFromClass, checkInvalidOptionsInferSignatures, createAnnotatedTypeFormatter, createAnnotationClassLoader, createAnnotationFormatter, createQualifierHierarchy, createQualifierHierarchy, createQualifierHierarchyFactory, createTypeArgumentInference, createTypeHierarchy, createTypeVariableSubstitutor, declarationFromElement, fromElement, fromElement, fromElement, getAnnotatedNullType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedType, getAnnotatedTypeFormatter, getAnnotatedTypeFromTypeTree, getAnnotationFormatter, getAnnotationMirror, getAnnotationWithMetaAnnotation, getBoxedType, getBundledTypeQualifiersWithoutPolyAll, getBundledTypeQualifiersWithPolyAll, getCacheSize, getContext, getCurrentClassTree, getCurrentClassType, getCurrentMethodReceiver, getDeclAnnotation, getDeclAnnotationNoAliases, getDeclAnnotations, getDeclAnnotationWithMetaAnnotation, getElementUtils, getEnclosingMethod, getEnclosingType, getFieldInvariantAnnotationTree, getFieldInvariantDeclarationAnnotations, getFieldInvariants, getFnInterfaceFromTree, getFnInterfaceFromTree, getImplicitReceiverType, getNarrowedPrimitive, getPath, getProcessingEnv, getQualifierHierarchy, getReceiverType, getSelfType, getStringType, getSupportedTypeQualifiers, getTreeUtils, getTypeArgumentInference, getTypeHierarchy, getTypeVarSubstitutor, getUnboxedType, getUninferredWildcardType, getVisitorState, getWholeProgramInference, initializeReflectionResolution, isAnyEnclosingThisDeref, isFromByteCode, isFromStubFile, isMostEnclosingThisDeref, isSupportedQualifier, isWithinConstructor, methodFromUse, parseStubFiles, postAsMemberOf, postProcessClassTree, postTypeVarSubstitution, setPathHack, toAnnotatedType, toString, type, widenToUpperBound
protected final AnnotationMirror REGEX
protected final AnnotationMirror REGEXBOTTOM
protected final AnnotationMirror PARTIALREGEX
protected final AnnotationMirror POLYREGEX
protected final ExecutableElement regexValueElement
public RegexAnnotatedTypeFactory(org.checkerframework.common.basetype.BaseTypeChecker checker)
protected Set<Class<? extends Annotation>> createSupportedTypeQualifiers()
createSupportedTypeQualifiers
in class org.checkerframework.framework.type.AnnotatedTypeFactory
public org.checkerframework.framework.flow.CFTransfer createFlowTransferFunction(org.checkerframework.framework.flow.CFAbstractAnalysis<org.checkerframework.framework.flow.CFValue,org.checkerframework.framework.flow.CFStore,org.checkerframework.framework.flow.CFTransfer> analysis)
createFlowTransferFunction
in class org.checkerframework.framework.type.GenericAnnotatedTypeFactory<org.checkerframework.framework.flow.CFValue,org.checkerframework.framework.flow.CFStore,org.checkerframework.framework.flow.CFTransfer,org.checkerframework.framework.flow.CFAnalysis>
public org.checkerframework.framework.type.QualifierHierarchy createQualifierHierarchy(org.checkerframework.framework.util.MultiGraphQualifierHierarchy.MultiGraphFactory factory)
createQualifierHierarchy
in class org.checkerframework.framework.type.AnnotatedTypeFactory
public int getGroupCount(AnnotationMirror anno)
public static int getGroupCount(String regex)
public org.checkerframework.framework.type.treeannotator.TreeAnnotator createTreeAnnotator()
createTreeAnnotator
in class org.checkerframework.framework.type.GenericAnnotatedTypeFactory<org.checkerframework.framework.flow.CFValue,org.checkerframework.framework.flow.CFStore,org.checkerframework.framework.flow.CFTransfer,org.checkerframework.framework.flow.CFAnalysis>