Class MethodInvocationNode
java.lang.Object
org.checkerframework.dataflow.cfg.node.Node
org.checkerframework.dataflow.cfg.node.MethodInvocationNode
- All Implemented Interfaces:
- org.plumelib.util.UniqueId
A node for method invocation.
 
target(arg1, arg2, ...)CFGs may contain
MethodInvocationNodes that correspond to no AST Tree, in which
 case, the tree field will be null.- 
Field SummaryFieldsModifier and TypeFieldDescriptionThe arguments of the method invocation.protected @Nullable ExpressionTreeIf this MethodInvocationNode is a node for anIterator.next()desugared from an enhanced for loop, then theiterExpressionfield is the expression in the for loop, e.g.,iterinfor(Object o: iter.protected final MethodAccessNodeThe MethodAccessNode for the method being invoked.protected final @Nullable MethodInvocationTreeThe tree for the method invocation.protected final TreePathThe tree path to the method invocation.
- 
Constructor SummaryConstructorsConstructorDescriptionMethodInvocationNode(@Nullable MethodInvocationTree tree, MethodAccessNode target, List<Node> arguments, TreePath treePath) Create a MethodInvocationNode.MethodInvocationNode(MethodAccessNode target, List<Node> arguments, TreePath treePath) 
- 
Method SummaryModifier and TypeMethodDescription<R,P> R accept(NodeVisitor<R, P> visitor, P p) Accept method of the visitor pattern.booleangetArgument(int i) If this MethodInvocationNode is a node for anIterator.next()desugared from an enhanced for loop, then return the expression in the for loop, e.g.,iterinfor(Object o: iter.getTree()Returns theTreein the abstract syntax tree, ornullif no corresponding tree exists.inthashCode()voidsetIterableExpression(@Nullable ExpressionTree iterableExpression) Set the iterable expression from a for loop.toString()Methods inherited from class org.checkerframework.dataflow.cfg.node.NodegetBlock, getInSource, getTransitiveOperands, getType, getUid, isLValue, nodeCollectionToString, setBlock, setInSource, setLValue, toStringDebugMethods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface org.plumelib.util.UniqueIdgetClassAndUid
- 
Field Details- 
treeThe tree for the method invocation.
- 
targetThe MethodAccessNode for the method being invoked. Includes the receiver if any. For a static method, the receiver may be a class name.
- 
argumentsThe arguments of the method invocation.
- 
treePathThe tree path to the method invocation.
- 
iterableExpressionIf this MethodInvocationNode is a node for anIterator.next()desugared from an enhanced for loop, then theiterExpressionfield is the expression in the for loop, e.g.,iterinfor(Object o: iter.Is set by setIterableExpression(com.sun.source.tree.ExpressionTree).
 
- 
- 
Constructor Details- 
MethodInvocationNodepublic MethodInvocationNode(@Nullable MethodInvocationTree tree, MethodAccessNode target, List<Node> arguments, TreePath treePath) Create a MethodInvocationNode.- Parameters:
- tree- for the method invocation
- target- the MethodAccessNode for the method being invoked
- arguments- arguments of the method invocation
- treePath- path to the method invocation
 
- 
MethodInvocationNode
 
- 
- 
Method Details- 
getTarget
- 
getArguments
- 
getArgument
- 
getTreePath
- 
getIterableExpressionIf this MethodInvocationNode is a node for anIterator.next()desugared from an enhanced for loop, then return the expression in the for loop, e.g.,iterinfor(Object o: iter. Otherwise, return null.- Returns:
- the iter expression, or null if this is not a Iterator.next()from an enhanced for loop
 
- 
setIterableExpressionSet the iterable expression from a for loop.- Parameters:
- iterableExpression- iterable expression
- See Also:
 
- 
getTreeDescription copied from class:NodeReturns theTreein the abstract syntax tree, ornullif no corresponding tree exists. For instance, this is the case for anImplicitThisNode.
- 
acceptDescription copied from class:NodeAccept method of the visitor pattern.
- 
toString
- 
equals
- 
hashCodepublic int hashCode()
- 
getOperandsDescription copied from class:Node- Specified by:
- getOperandsin class- Node
- Returns:
- a collection containing all of the operand Nodes of thisNode
 
 
-