Class CFGTranslationPhaseOne
- All Implemented Interfaces:
- TreeVisitor<Node,- Void> 
- Direct Known Subclasses:
- CFCFGBuilder.CFCFGTranslationPhaseOne
- A sequence of extended nodes.
- A set of bindings from Labels to positions in the node sequence.
- A set of leader nodes that give rise to basic blocks in phase two.
- A mapping from AST tree nodes to Nodes.
The return type of this scanner is Node. For expressions, the corresponding node is
 returned to allow linking between different nodes.
 
However, for statements there is usually no single Node that is created, and thus no
 node is returned (rather, null is returned).
 
Every visit* method is assumed to add at least one extended node to the list of nodes
 (which might only be a jump).
 
The entry point to process a single body (e.g., method) is process(TreePath, UnderlyingAST).
- 
Field SummaryFieldsModifier and TypeFieldDescriptionprotected final AnnotationProviderThe annotation provider, e.g., a type factory.protected final TypeMirrorThe ArithmeticException type.protected final TypeMirrorThe ArrayIndexOutOfBoundsException type.protected final TypeMirrorThe AssertionError type.protected final booleanCan assertions be assumed to be disabled?protected final booleanCan assertions be assumed to be enabled?protected final TypeMirrorThe ClassCastException type .protected final @Nullable TypeMirrorThe ClassCircularityError type.protected final @Nullable TypeMirrorThe ClassFormatErrorType type.protected VariableTreeTheVariableTreethat indicates whether assertions are enabled or not.protected final ElementsThe javac element utilities.protected final ProcessingEnvironmentAnnotation processing environment and its associated type and tree utilities.protected final TypeMirrorThe Iterable type (erased).protected final TypeMirrorThe NegativeArraySizeException type.protected final Set<TypeMirror>Exceptions that can be thrown by array creation "new SomeType[]".protected final @Nullable TypeMirrorThe NoClassDefFoundError type.protected final TypeMirrorThe NullPointerException type .protected final @Nullable TypeMirrorThe OutOfMemoryError type.protected final TypeMirrorThe String type.protected final TypeMirrorThe Throwable type.protected final TreeBuilderThe tree builder.protected final TreesThe javac tree utilities.protected final TypesThe javac type utilities.protected longThe UID for the next unique name.protected final Set<TypeMirror>Supertypes of all unchecked exceptions.
- 
Constructor SummaryConstructorsConstructorDescriptionCFGTranslationPhaseOne(TreeBuilder treeBuilder, AnnotationProvider annotationProvider, boolean assumeAssertionsEnabled, boolean assumeAssertionsDisabled, ProcessingEnvironment env) 
- 
Method SummaryModifier and TypeMethodDescriptionprotected voidaddLabelForNextNode(org.checkerframework.dataflow.cfg.builder.Label l) Add the labellto the extended node that will be placed next in the sequence.protected voidaddToConvertedLookupMap(Tree tree, Node node) Add a node in the post-conversion lookup map.protected voidaddToConvertedLookupMap(Node node) Add a node in the post-conversion lookup map.protected voidaddToLookupMap(Node node) Add a node to the lookup map if it not already present.protected NodeassignConvert(Node node, TypeMirror varType) Perform assignment conversion so that it can be assigned to a variable of the given type.protected booleanShould assertions be assumed to be executed for a givenAssertTree? False by default.protected NodebinaryNumericPromotion(Node node, TypeMirror exprType) Perform binary numeric promotion on the input node to make it match the expression type.protected TypeMirrorbinaryPromotedType(TypeMirror left, TypeMirror right) Compute the type to which two numeric types must be promoted before performing a binary numeric operation on them.protected NodeIf the input node is an unboxed primitive type, insert a call to the appropriate valueOf method, otherwise leave it alone.protected NodecommonConvert(Node node, TypeMirror varType, boolean contextAllowsNarrowing) Assignment conversion and method invocation conversion are almost identical, except that assignment conversion allows narrowing.protected NodeconditionalExprPromotion(Node node, TypeMirror destType) Convert an operand of a conditional expression to the type of the whole expression.protected booleanconversionRequiresNarrowing(TypeMirror varType, Node node) Return whether a conversion from the type of the node to varType requires narrowing.convertCallArguments(ExecutableElement method, ExecutableType methodType, List<? extends ExpressionTree> actualExprs) Given a method element, its type at the call site, and a list of argument expressions, return a list ofNodes representing the arguments converted for a call of the method.protected VariableTreecreateEnhancedForLoopArrayVariable(ExpressionTree expression, VariableElement variableElement) protected VariableTreecreateEnhancedForLoopIteratorVariable(MethodInvocationTree iteratorCall, VariableElement variableElement) protected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolderExtend a list of extended nodes with a ClassName node.protected voidextendWithExtendedNode(org.checkerframework.dataflow.cfg.builder.ExtendedNode n) Extend the list of extended nodes with an extended node.protected voidextendWithNode(Node node) Extend the list of extended nodes with a node.protected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolderextendWithNodeWithException(Node node, TypeMirror cause) Extend the list of extended nodes with a node, wherenodemight throw the exceptioncause.protected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolderextendWithNodeWithExceptions(Node node, Set<TypeMirror> causes) Extend the list of extended nodes with a node, wherenodemight throw any of the exceptions incauses.protected VariableTreeGet a syntheticVariableTreethat indicates whether assertions are enabled or not.Returns the current path for the tree currently being scanned.Returns the labelNameof the leaf in the argument path, or null if the leaf is not a labeled statement.protected TypeMirrorgetTypeMirror(Class<?> clazz) Returns the TypeMirror for the given class.voidhandleArtificialTree(Tree tree) Perform any actions required when CFG translation creates a new Tree that is not part of the original AST.protected voidinsertExtendedNodeAfter(org.checkerframework.dataflow.cfg.builder.ExtendedNode n, Node pred) Insertnafter the nodepredin the list of extended nodes, or appendnifpredis not present.protected <T extends Node>
 TinsertNodeAfter(T node, Node pred) Insertnodeafterpredin the list of extended nodes, or append to the list ifpredis not present.protected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolderinsertNodeWithExceptionsAfter(Node node, Set<TypeMirror> causes, Node pred) Insert anodethat might throw the exceptions incausesafterpredin the list of extended nodes, or append to the list ifpredis not present.protected booleanisNumericOrBoxed(TypeMirror type) Returns true if the argument type is a numeric primitive or a boxed numeric primitive and false otherwise.protected @Nullable TypeMirrormaybeGetTypeMirror(Class<?> clazz) Returns the TypeMirror for the given class, ornullif the type is not present.protected NodemethodInvocationConvert(Node node, TypeMirror formalType) Perform method invocation conversion so that the node can be passed as a formal parameter of the given type.protected Nodenarrow(Node node, TypeMirror destType) Perform narrowing conversion on the input node to make it match the destination type.protected NodenarrowAndBox(Node node, TypeMirror destType) Perform narrowing conversion and optionally boxing conversion on the input node to make it match the destination type.process(CompilationUnitTree root, UnderlyingAST underlyingAST) Process a single body withinroot.process(TreePath bodyPath, UnderlyingAST underlyingAST) Performs the actual work of phase one: processing a single body (of a method, lambda, top-level block, etc.).protected NodestringConversion(Node node) Convert the input node to String type, if it isn't already.protected voidTranslates an assertion statement to the correct CFG nodes.protected AssignmentNodetranslateAssignment(Tree tree, Node target, ExpressionTree rhs) Translate an assignment.protected AssignmentNodetranslateAssignment(Tree tree, Node target, Node expression) Translate an assignment where the RHS has already been scanned.protected NodeunaryNumericPromotion(Node node) Perform unary numeric promotion on the input node.protected NodeIf the input node is a boxed type, unbox it, otherwise leave it alone.protected StringuniqueName(String prefix) Returns a unique name starting withprefix.visitAnnotatedType(AnnotatedTypeTree tree, Void p) visitAnnotation(AnnotationTree tree, Void p) visitArrayAccess(ArrayAccessTree tree, Void p) visitArrayType(ArrayTypeTree tree, Void p) visitAssert(AssertTree tree, Void p) visitAssignment(AssignmentTree tree, Void p) visitBinary(BinaryTree tree, Void p) visitBindingPattern17(Tree bindingPatternTree, Void p) Visit a BindingPatternTreevisitBlock(BlockTree tree, Void p) visitBreak(BreakTree tree, Void p) visitCatch(CatchTree tree, Void p) visitClass(ClassTree tree, Void p) visitCompilationUnit(CompilationUnitTree tree, Void p) visitContinue(ContinueTree tree, Void p) visitDoWhileLoop(DoWhileLoopTree tree, Void p) visitEmptyStatement(EmptyStatementTree tree, Void p) visitEnhancedForLoop(EnhancedForLoopTree tree, Void p) visitErroneous(ErroneousTree tree, Void p) visitForLoop(ForLoopTree tree, Void p) visitIdentifier(IdentifierTree tree, Void p) visitImport(ImportTree tree, Void p) visitInstanceOf(InstanceOfTree tree, Void p) visitLiteral(LiteralTree tree, Void p) visitMemberReference(MemberReferenceTree tree, Void p) visitMemberSelect(MemberSelectTree tree, Void p) visitMethod(MethodTree tree, Void p) visitModifiers(ModifiersTree tree, Void p) visitNewArray(NewArrayTree tree, Void p) visitNewClass(NewClassTree tree, Void p) visitOther(Tree tree, Void p) visitParenthesized(ParenthesizedTree tree, Void p) visitPrimitiveType(PrimitiveTypeTree tree, Void p) visitReturn(ReturnTree tree, Void p) visitSwitch(SwitchTree tree, Void p) visitSwitchExpression17(Tree switchExpressionTree, Void p) Visit a SwitchExpressionTreevisitSynchronized(SynchronizedTree tree, Void p) visitThrow(ThrowTree tree, Void p) visitTypeCast(TypeCastTree tree, Void p) visitTypeParameter(TypeParameterTree tree, Void p) visitUnary(UnaryTree tree, Void p) visitUnionType(UnionTypeTree tree, Void p) visitVariable(VariableTree tree, Void p) visitWhileLoop(WhileLoopTree tree, Void p) visitWildcard(WildcardTree tree, Void p) visitYield17(Tree yieldTree, Void p) Visit a SwitchExpressionTree.protected Nodewiden(Node node, TypeMirror destType) Perform widening primitive conversion on the input node to make it match the destination type.protected Tree.KindwithoutAssignment(Tree.Kind kind) Map an operation with assignment to the corresponding operation without assignment.Methods inherited from class com.sun.source.util.TreeScannerreduce, scan, visitBindingPattern, visitDefaultCaseLabel, visitExports, visitGuardedPattern, visitIntersectionType, visitModule, visitOpens, visitPackage, visitParenthesizedPattern, visitProvides, visitRequires, visitSwitchExpression, visitUses, visitYield
- 
Field Details- 
envAnnotation processing environment and its associated type and tree utilities.
- 
elementsThe javac element utilities.
- 
typesThe javac type utilities.
- 
treesThe javac tree utilities.
- 
treeBuilderThe tree builder.
- 
annotationProviderThe annotation provider, e.g., a type factory.
- 
assumeAssertionsDisabledprotected final boolean assumeAssertionsDisabledCan assertions be assumed to be disabled?
- 
assumeAssertionsEnabledprotected final boolean assumeAssertionsEnabledCan assertions be assumed to be enabled?
- 
arithmeticExceptionTypeThe ArithmeticException type.
- 
arrayIndexOutOfBoundsExceptionTypeThe ArrayIndexOutOfBoundsException type.
- 
assertionErrorTypeThe AssertionError type.
- 
classCastExceptionTypeThe ClassCastException type .
- 
iterableTypeThe Iterable type (erased).
- 
negativeArraySizeExceptionTypeThe NegativeArraySizeException type.
- 
nullPointerExceptionTypeThe NullPointerException type .
- 
outOfMemoryErrorTypeThe OutOfMemoryError type.
- 
classCircularityErrorTypeThe ClassCircularityError type.
- 
classFormatErrorTypeThe ClassFormatErrorType type.
- 
noClassDefFoundErrorTypeThe NoClassDefFoundError type.
- 
stringTypeThe String type.
- 
throwableTypeThe Throwable type.
- 
uncheckedExceptionTypesSupertypes of all unchecked exceptions. The size is 2 and the contents areRuntimeExceptionandError.
- 
newArrayExceptionTypesExceptions that can be thrown by array creation "new SomeType[]". The size is 2 and the contents areNegativeArraySizeExceptionandOutOfMemoryError. This list comes from JLS 15.10.1 "Run-Time Evaluation of Array Creation Expressions".
- 
uidprotected long uidThe UID for the next unique name.
- 
eaTheVariableTreethat indicates whether assertions are enabled or not.
 
- 
- 
Constructor Details- 
CFGTranslationPhaseOnepublic CFGTranslationPhaseOne(TreeBuilder treeBuilder, AnnotationProvider annotationProvider, boolean assumeAssertionsEnabled, boolean assumeAssertionsDisabled, ProcessingEnvironment env) - Parameters:
- treeBuilder- builder for new AST nodes
- annotationProvider- extracts annotations from AST nodes
- assumeAssertionsDisabled- can assertions be assumed to be disabled?
- assumeAssertionsEnabled- can assertions be assumed to be enabled?
- env- annotation processing environment containing type utilities
 
 
- 
- 
Method Details- 
processPerforms the actual work of phase one: processing a single body (of a method, lambda, top-level block, etc.).- Parameters:
- bodyPath- path to the body of the underlying AST's method
- underlyingAST- the AST for which the CFG is to be built
- Returns:
- the result of phase one
 
- 
processProcess a single body withinroot. This method does not process the entire given CompilationUnitTree. Rather, it processes one body (of a method/lambda/etc.) within it, which corresponds tounderlyingAST.- Parameters:
- root- the compilation unit
- underlyingAST- the AST corresponding to the body to process
- Returns:
- a PhaseOneResult
 
- 
handleArtificialTreePerform any actions required when CFG translation creates a new Tree that is not part of the original AST.- Parameters:
- tree- the newly created Tree
 
- 
getCurrentPathReturns the current path for the tree currently being scanned.- Returns:
- the current path
 
- 
scan- Overrides:
- scanin class- TreeScanner<Node,- Void> 
 
- 
visitYield17Visit a SwitchExpressionTree.- Parameters:
- yieldTree- a YieldTree, typed as Tree to be backward-compatible
- p- parameter
- Returns:
- the result of visiting the switch expression tree
 
- 
visitSwitchExpression17Visit a SwitchExpressionTree- Parameters:
- switchExpressionTree- a SwitchExpressionTree, typed as Tree to be backward-compatible
- p- parameter
- Returns:
- the result of visiting the switch expression tree
 
- 
visitBindingPattern17Visit a BindingPatternTree- Parameters:
- bindingPatternTree- a BindingPatternTree, typed as Tree to be backward-compatible
- p- parameter
- Returns:
- the result of visiting the binding pattern tree
 
- 
addToLookupMapAdd a node to the lookup map if it not already present.- Parameters:
- node- the node to add to the lookup map
 
- 
addToConvertedLookupMapAdd a node in the post-conversion lookup map. The node should refer to a Tree and that Tree should already be in the pre-conversion lookup map. This method is used to update the Tree-Node mapping with conversion nodes.- Parameters:
- node- the node to add to the lookup map
 
- 
addToConvertedLookupMapAdd a node in the post-conversion lookup map. The tree argument should already be in the pre-conversion lookup map. This method is used to update the Tree-Node mapping with conversion nodes.- Parameters:
- tree- the tree used as a key in the map
- node- the node to add to the lookup map
 
- 
extendWithNodeExtend the list of extended nodes with a node.- Parameters:
- node- the node to add
 
- 
extendWithNodeWithExceptionprotected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolder extendWithNodeWithException(Node node, TypeMirror cause) Extend the list of extended nodes with a node, wherenodemight throw the exceptioncause.- Parameters:
- node- the node to add
- cause- an exception that the node might throw
- Returns:
- the node holder
 
- 
extendWithNodeWithExceptionsprotected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolder extendWithNodeWithExceptions(Node node, Set<TypeMirror> causes) Extend the list of extended nodes with a node, wherenodemight throw any of the exceptions incauses.- Parameters:
- node- the node to add
- causes- set of exceptions that the node might throw
- Returns:
- the node holder
 
- 
extendWithClassNameNodeprotected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolder extendWithClassNameNode(ClassNameNode node) Extend a list of extended nodes with a ClassName node.Evaluating a class literal kicks off class loading (JLS 15.8.2) which can fail and throw one of the specified subclasses of a LinkageError or an OutOfMemoryError (JLS 12.2.1). - Parameters:
- node- the ClassName node to add
- Returns:
- the node holder
 
- 
insertNodeAfterInsertnodeafterpredin the list of extended nodes, or append to the list ifpredis not present.- Parameters:
- node- the node to add
- pred- the desired predecessor of node
- Returns:
- the node holder
 
- 
insertNodeWithExceptionsAfterprotected org.checkerframework.dataflow.cfg.builder.NodeWithExceptionsHolder insertNodeWithExceptionsAfter(Node node, Set<TypeMirror> causes, Node pred) Insert anodethat might throw the exceptions incausesafterpredin the list of extended nodes, or append to the list ifpredis not present.- Parameters:
- node- the node to add
- causes- set of exceptions that the node might throw
- pred- the desired predecessor of node
- Returns:
- the node holder
 
- 
extendWithExtendedNodeprotected void extendWithExtendedNode(org.checkerframework.dataflow.cfg.builder.ExtendedNode n) Extend the list of extended nodes with an extended node.- Parameters:
- n- the extended node
 
- 
insertExtendedNodeAfterprotected void insertExtendedNodeAfter(org.checkerframework.dataflow.cfg.builder.ExtendedNode n, @FindDistinct Node pred) Insertnafter the nodepredin the list of extended nodes, or appendnifpredis not present.- Parameters:
- n- the extended node
- pred- the desired predecessor
 
- 
addLabelForNextNodeprotected void addLabelForNextNode(org.checkerframework.dataflow.cfg.builder.Label l) Add the labellto the extended node that will be placed next in the sequence.- Parameters:
- l- the node to add to the forthcoming extended node
 
- 
uniqueNameReturns a unique name starting withprefix.- Parameters:
- prefix- the prefix of the unique name
- Returns:
- a unique name starting with prefix
 
- 
boxIf the input node is an unboxed primitive type, insert a call to the appropriate valueOf method, otherwise leave it alone.- Parameters:
- node- in input node
- Returns:
- a Node representing the boxed version of the input, which may simply be the input node
 
- 
unboxIf the input node is a boxed type, unbox it, otherwise leave it alone.- Parameters:
- node- in input node
- Returns:
- a Node representing the unboxed version of the input, which may simply be the input node
 
- 
stringConversionConvert the input node to String type, if it isn't already.- Parameters:
- node- an input node
- Returns:
- a Node with the value promoted to String, which may be the input node
 
- 
unaryNumericPromotionPerform unary numeric promotion on the input node.- Parameters:
- node- a node producing a value of numeric primitive or boxed type
- Returns:
- a Node with the value promoted to the int, long, float, or double; may return be the input node
 
- 
isNumericOrBoxedReturns true if the argument type is a numeric primitive or a boxed numeric primitive and false otherwise.
- 
binaryPromotedTypeCompute the type to which two numeric types must be promoted before performing a binary numeric operation on them. The input types must both be numeric and the output type is primitive.- Parameters:
- left- the type of the left operand
- right- the type of the right operand
- Returns:
- a TypeMirror representing the binary numeric promoted type
 
- 
binaryNumericPromotionPerform binary numeric promotion on the input node to make it match the expression type.- Parameters:
- node- a node producing a value of numeric primitive or boxed type
- exprType- the type to promote the value to
- Returns:
- a Node with the value promoted to the exprType, which may be the input node
 
- 
widenPerform widening primitive conversion on the input node to make it match the destination type.- Parameters:
- node- a node producing a value of numeric primitive type
- destType- the type to widen the value to
- Returns:
- a Node with the value widened to the exprType, which may be the input node
 
- 
narrowPerform narrowing conversion on the input node to make it match the destination type.- Parameters:
- node- a node producing a value of numeric primitive type
- destType- the type to narrow the value to
- Returns:
- a Node with the value narrowed to the exprType, which may be the input node
 
- 
narrowAndBoxPerform narrowing conversion and optionally boxing conversion on the input node to make it match the destination type.- Parameters:
- node- a node producing a value of numeric primitive type
- destType- the type to narrow the value to (possibly boxed)
- Returns:
- a Node with the value narrowed and boxed to the destType, which may be the input node
 
- 
conversionRequiresNarrowingReturn whether a conversion from the type of the node to varType requires narrowing.- Parameters:
- varType- the type of a variable (or general LHS) to be converted to
- node- a node whose value is being converted
- Returns:
- whether this conversion requires narrowing to succeed
 
- 
commonConvertAssignment conversion and method invocation conversion are almost identical, except that assignment conversion allows narrowing. We factor out the common logic here.- Parameters:
- node- a Node producing a value
- varType- the type of a variable
- contextAllowsNarrowing- whether to allow narrowing (for assignment conversion) or not (for method invocation conversion)
- Returns:
- a Node with the value converted to the type of the variable, which may be the input node itself
 
- 
assignConvertPerform assignment conversion so that it can be assigned to a variable of the given type.- Parameters:
- node- a Node producing a value
- varType- the type of a variable
- Returns:
- a Node with the value converted to the type of the variable, which may be the input node itself
 
- 
methodInvocationConvertPerform method invocation conversion so that the node can be passed as a formal parameter of the given type.- Parameters:
- node- a Node producing a value
- formalType- the type of a formal parameter
- Returns:
- a Node with the value converted to the type of the formal, which may be the input node itself
 
- 
convertCallArgumentsprotected List<Node> convertCallArguments(ExecutableElement method, ExecutableType methodType, List<? extends ExpressionTree> actualExprs) Given a method element, its type at the call site, and a list of argument expressions, return a list ofNodes representing the arguments converted for a call of the method. This method applies to both method invocations and constructor calls.- Parameters:
- method- an ExecutableElement representing a method to be called
- methodType- an ExecutableType representing the type of the method call; the type must be viewpoint-adapted to the call
- actualExprs- a List of argument expressions to a call
- Returns:
- a List of Nodes representing arguments after conversions required by a call to this method
 
- 
conditionalExprPromotionConvert an operand of a conditional expression to the type of the whole expression.- Parameters:
- node- a node occurring as the second or third operand of a conditional expression
- destType- the type to promote the value to
- Returns:
- a Node with the value promoted to the destType, which may be the input node
 
- 
getLabelReturns the labelNameof the leaf in the argument path, or null if the leaf is not a labeled statement.
- 
visitAnnotatedType- Specified by:
- visitAnnotatedTypein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitAnnotatedTypein class- TreeScanner<Node,- Void> 
 
- 
visitAnnotation- Specified by:
- visitAnnotationin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitAnnotationin class- TreeScanner<Node,- Void> 
 
- 
visitMethodInvocation- Specified by:
- visitMethodInvocationin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitMethodInvocationin class- TreeScanner<Node,- Void> 
 
- 
visitAssert- Specified by:
- visitAssertin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitAssertin class- TreeScanner<Node,- Void> 
 
- 
assumeAssertionsEnabledForShould assertions be assumed to be executed for a givenAssertTree? False by default.
- 
getAssertionsEnabledVariableGet a syntheticVariableTreethat indicates whether assertions are enabled or not.
- 
translateAssertWithAssertionsEnabledTranslates an assertion statement to the correct CFG nodes. The translation assumes that assertions are enabled.
- 
visitAssignment- Specified by:
- visitAssignmentin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitAssignmentin class- TreeScanner<Node,- Void> 
 
- 
translateAssignmentTranslate an assignment.
- 
translateAssignmentTranslate an assignment where the RHS has already been scanned.
- 
withoutAssignmentMap an operation with assignment to the corresponding operation without assignment.- Parameters:
- kind- a Tree.Kind representing an operation with assignment
- Returns:
- the Tree.Kind for the same operation without assignment
 
- 
visitCompoundAssignment- Specified by:
- visitCompoundAssignmentin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitCompoundAssignmentin class- TreeScanner<Node,- Void> 
 
- 
visitBinary- Specified by:
- visitBinaryin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitBinaryin class- TreeScanner<Node,- Void> 
 
- 
visitBlock- Specified by:
- visitBlockin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitBlockin class- TreeScanner<Node,- Void> 
 
- 
visitBreak- Specified by:
- visitBreakin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitBreakin class- TreeScanner<Node,- Void> 
 
- 
visitSwitch- Specified by:
- visitSwitchin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitSwitchin class- TreeScanner<Node,- Void> 
 
- 
visitCase- Specified by:
- visitCasein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitCasein class- TreeScanner<Node,- Void> 
 
- 
visitCatch- Specified by:
- visitCatchin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitCatchin class- TreeScanner<Node,- Void> 
 
- 
visitClass- Specified by:
- visitClassin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitClassin class- TreeScanner<Node,- Void> 
 
- 
visitConditionalExpression- Specified by:
- visitConditionalExpressionin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitConditionalExpressionin class- TreeScanner<Node,- Void> 
 
- 
visitContinue- Specified by:
- visitContinuein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitContinuein class- TreeScanner<Node,- Void> 
 
- 
visitDoWhileLoop- Specified by:
- visitDoWhileLoopin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitDoWhileLoopin class- TreeScanner<Node,- Void> 
 
- 
visitErroneous- Specified by:
- visitErroneousin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitErroneousin class- TreeScanner<Node,- Void> 
 
- 
visitExpressionStatement- Specified by:
- visitExpressionStatementin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitExpressionStatementin class- TreeScanner<Node,- Void> 
 
- 
visitEnhancedForLoop- Specified by:
- visitEnhancedForLoopin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitEnhancedForLoopin class- TreeScanner<Node,- Void> 
 
- 
createEnhancedForLoopIteratorVariableprotected VariableTree createEnhancedForLoopIteratorVariable(MethodInvocationTree iteratorCall, VariableElement variableElement) 
- 
createEnhancedForLoopArrayVariableprotected VariableTree createEnhancedForLoopArrayVariable(ExpressionTree expression, VariableElement variableElement) 
- 
visitForLoop- Specified by:
- visitForLoopin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitForLoopin class- TreeScanner<Node,- Void> 
 
- 
visitIdentifier- Specified by:
- visitIdentifierin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitIdentifierin class- TreeScanner<Node,- Void> 
 
- 
visitIf- Specified by:
- visitIfin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitIfin class- TreeScanner<Node,- Void> 
 
- 
visitImport- Specified by:
- visitImportin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitImportin class- TreeScanner<Node,- Void> 
 
- 
visitArrayAccess- Specified by:
- visitArrayAccessin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitArrayAccessin class- TreeScanner<Node,- Void> 
 
- 
visitLabeledStatement- Specified by:
- visitLabeledStatementin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitLabeledStatementin class- TreeScanner<Node,- Void> 
 
- 
visitLiteral- Specified by:
- visitLiteralin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitLiteralin class- TreeScanner<Node,- Void> 
 
- 
visitMethod- Specified by:
- visitMethodin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitMethodin class- TreeScanner<Node,- Void> 
 
- 
visitModifiers- Specified by:
- visitModifiersin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitModifiersin class- TreeScanner<Node,- Void> 
 
- 
visitNewArray- Specified by:
- visitNewArrayin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitNewArrayin class- TreeScanner<Node,- Void> 
 
- 
visitNewClass- Specified by:
- visitNewClassin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitNewClassin class- TreeScanner<Node,- Void> 
 
- 
visitParenthesized- Specified by:
- visitParenthesizedin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitParenthesizedin class- TreeScanner<Node,- Void> 
 
- 
visitReturn- Specified by:
- visitReturnin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitReturnin class- TreeScanner<Node,- Void> 
 
- 
visitMemberSelect- Specified by:
- visitMemberSelectin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitMemberSelectin class- TreeScanner<Node,- Void> 
 
- 
visitEmptyStatement- Specified by:
- visitEmptyStatementin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitEmptyStatementin class- TreeScanner<Node,- Void> 
 
- 
visitSynchronized- Specified by:
- visitSynchronizedin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitSynchronizedin class- TreeScanner<Node,- Void> 
 
- 
visitThrow- Specified by:
- visitThrowin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitThrowin class- TreeScanner<Node,- Void> 
 
- 
visitCompilationUnit- Specified by:
- visitCompilationUnitin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitCompilationUnitin class- TreeScanner<Node,- Void> 
 
- 
visitTry- Specified by:
- visitTryin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitTryin class- TreeScanner<Node,- Void> 
 
- 
visitParameterizedType- Specified by:
- visitParameterizedTypein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitParameterizedTypein class- TreeScanner<Node,- Void> 
 
- 
visitUnionType- Specified by:
- visitUnionTypein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitUnionTypein class- TreeScanner<Node,- Void> 
 
- 
visitArrayType- Specified by:
- visitArrayTypein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitArrayTypein class- TreeScanner<Node,- Void> 
 
- 
visitTypeCast- Specified by:
- visitTypeCastin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitTypeCastin class- TreeScanner<Node,- Void> 
 
- 
visitPrimitiveType- Specified by:
- visitPrimitiveTypein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitPrimitiveTypein class- TreeScanner<Node,- Void> 
 
- 
visitTypeParameter- Specified by:
- visitTypeParameterin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitTypeParameterin class- TreeScanner<Node,- Void> 
 
- 
visitInstanceOf- Specified by:
- visitInstanceOfin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitInstanceOfin class- TreeScanner<Node,- Void> 
 
- 
visitUnary- Specified by:
- visitUnaryin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitUnaryin class- TreeScanner<Node,- Void> 
 
- 
visitVariable- Specified by:
- visitVariablein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitVariablein class- TreeScanner<Node,- Void> 
 
- 
visitWhileLoop- Specified by:
- visitWhileLoopin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitWhileLoopin class- TreeScanner<Node,- Void> 
 
- 
visitLambdaExpression- Specified by:
- visitLambdaExpressionin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitLambdaExpressionin class- TreeScanner<Node,- Void> 
 
- 
visitMemberReference- Specified by:
- visitMemberReferencein interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitMemberReferencein class- TreeScanner<Node,- Void> 
 
- 
visitWildcard- Specified by:
- visitWildcardin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitWildcardin class- TreeScanner<Node,- Void> 
 
- 
visitOther- Specified by:
- visitOtherin interface- TreeVisitor<Node,- Void> 
- Overrides:
- visitOtherin class- TreeScanner<Node,- Void> 
 
- 
getTypeMirrorReturns the TypeMirror for the given class.- Parameters:
- clazz- a class
- Returns:
- the TypeMirror for the class
 
- 
maybeGetTypeMirrorReturns the TypeMirror for the given class, ornullif the type is not present.This can be used to handle system types that are not present. For example, in Java code that is translated to JavaScript using j2cl, the custom bootclasspath contains APIs that are emulated in JavaScript, so some types such as OutOfMemoryError are deliberately not present. - Parameters:
- clazz- a class, which must have a canonical name
- Returns:
- the TypeMirror for the class, or nullif the type is not present
 
 
-