Class OffsetDependentTypesHelper
java.lang.Object
org.checkerframework.framework.util.dependenttypes.DependentTypesHelper
org.checkerframework.checker.index.OffsetDependentTypesHelper
Dependent type helper for array offset expressions. Each array offset expression may be the
addition or subtraction of several Java expressions. For example,
array.length - 1
.-
Field Summary
Fields inherited from class org.checkerframework.framework.util.dependenttypes.DependentTypesHelper
factory, objectTM
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionCreates a TreeAnnotator that viewpoint-adapts dependent type annotations.protected @Nullable JavaExpression
transform
(JavaExpression javaExpr) This method is for subclasses to override to change JavaExpressions in some way before they are inserted into new annotations.Methods inherited from class org.checkerframework.framework.util.dependenttypes.DependentTypesHelper
atConstructorInvocation, atExpression, atFieldAccess, atLocalVariable, atMethodBody, atMethodInvocation, atParameterizedTypeUse, atTypeDecl, atVariableDeclaration, buildAnnotation, checkAnnotationForErrorExpressions, checkClassForErrorExpressions, checkMethodForErrorExpressions, checkTypeForErrorExpressions, convertAnnotatedTypeMirror, convertAnnotationMirror, createError, createError, delocalize, delocalizeAtCallsite, hasDependentAnnotations, reportErrors, shouldPassThroughExpression
-
Constructor Details
-
OffsetDependentTypesHelper
-
-
Method Details
-
transform
Description copied from class:DependentTypesHelper
This method is for subclasses to override to change JavaExpressions in some way before they are inserted into new annotations. This method is called after parsing and viewpoint-adaptation have occurred.javaExpr
may be aDependentTypesHelper.PassThroughExpression
.If
null
is returned then the expression is not added to the new annotation.The default implementation returns the argument, but subclasses may override it.
- Overrides:
transform
in classDependentTypesHelper
- Parameters:
javaExpr
- a JavaExpression- Returns:
- a transformed JavaExpression or
null
if no transformation exists
-
createDependentTypesTreeAnnotator
Description copied from class:DependentTypesHelper
Creates a TreeAnnotator that viewpoint-adapts dependent type annotations.- Overrides:
createDependentTypesTreeAnnotator
in classDependentTypesHelper
- Returns:
- a new TreeAnnotator that viewpoint-adapts dependent type annotations
-