protected class UpperBoundAnnotatedTypeFactory.UpperBoundTreeAnnotator extends TreeAnnotator
atypeFactoryDEFAULT_VALUE| Constructor and Description |
|---|
UpperBoundTreeAnnotator(UpperBoundAnnotatedTypeFactory factory) |
| Modifier and Type | Method and Description |
|---|---|
Void |
visitBinary(BinaryTree tree,
AnnotatedTypeMirror type)
When overriding this method, getAnnotatedType on the left and right operands should only be
called when absolutely necessary.
|
Void |
visitCompoundAssignment(CompoundAssignmentTree node,
AnnotatedTypeMirror type) |
Void |
visitMethodInvocation(MethodInvocationTree tree,
AnnotatedTypeMirror type)
This exists for Math.min and Random.nextInt, which must be special-cased.
|
Void |
visitUnary(UnaryTree node,
AnnotatedTypeMirror type) |
visitMethoddefaultAction, visit, visit, visitAnnotatedType, visitAnnotation, visitArrayAccess, visitArrayType, visitAssert, visitAssignment, visitBlock, visitBreak, visitCase, visitCatch, visitClass, visitCompilationUnit, visitConditionalExpression, visitContinue, visitDoWhileLoop, visitEmptyStatement, visitEnhancedForLoop, visitErroneous, visitExpressionStatement, visitForLoop, visitIdentifier, visitIf, visitImport, visitInstanceOf, visitIntersectionType, visitLabeledStatement, visitLambdaExpression, visitLiteral, visitMemberReference, visitMemberSelect, visitModifiers, visitNewArray, visitNewClass, visitOther, visitParameterizedType, visitParenthesized, visitPrimitiveType, visitReturn, visitSwitch, visitSynchronized, visitThrow, visitTry, visitTypeCast, visitTypeParameter, visitUnionType, visitVariable, visitWhileLoop, visitWildcardpublic UpperBoundTreeAnnotator(UpperBoundAnnotatedTypeFactory factory)
public Void visitMethodInvocation(MethodInvocationTree tree, AnnotatedTypeMirror type)
visitMethodInvocation in interface TreeVisitor<Void,AnnotatedTypeMirror>visitMethodInvocation in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>public Void visitUnary(UnaryTree node, AnnotatedTypeMirror type)
visitUnary in interface TreeVisitor<Void,AnnotatedTypeMirror>visitUnary in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>public Void visitCompoundAssignment(CompoundAssignmentTree node, AnnotatedTypeMirror type)
visitCompoundAssignment in interface TreeVisitor<Void,AnnotatedTypeMirror>visitCompoundAssignment in class SimpleTreeVisitor<Void,AnnotatedTypeMirror>public Void visitBinary(BinaryTree tree, AnnotatedTypeMirror type)
TreeAnnotatorIf a checker's performance is still too slow, the types of binary trees could be computed
in a subclass of CFTransfer. When computing the
types in a transfer, look up the value in the store rather than the AnnotatedTypeFactory.
Then this method should annotate binary trees with top so that the type applied in the
transfer is always a subtype of the type the AnnotatedTypeFactory computes.
visitBinary in interface TreeVisitor<Void,AnnotatedTypeMirror>visitBinary in class TreeAnnotator