diff options
Diffstat (limited to 'third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/MethodInvocationNode.java')
-rw-r--r-- | third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/MethodInvocationNode.java | 27 |
1 files changed, 12 insertions, 15 deletions
diff --git a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/MethodInvocationNode.java b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/MethodInvocationNode.java index 797185a83b..9456f37808 100644 --- a/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/MethodInvocationNode.java +++ b/third_party/checker_framework_dataflow/java/org/checkerframework/dataflow/cfg/node/MethodInvocationNode.java @@ -1,18 +1,15 @@ package org.checkerframework.dataflow.cfg.node; +import com.sun.source.tree.MethodInvocationTree; +import com.sun.source.tree.Tree; +import com.sun.source.util.TreePath; import java.util.Collection; import java.util.LinkedList; import java.util.List; - import org.checkerframework.dataflow.cfg.node.AssignmentContext.MethodParameterContext; import org.checkerframework.dataflow.util.HashCodeUtils; - import org.checkerframework.javacutil.InternalUtils; -import com.sun.source.tree.MethodInvocationTree; -import com.sun.source.tree.Tree; -import com.sun.source.util.TreePath; - /** * A node for method invocation * @@ -20,12 +17,11 @@ import com.sun.source.util.TreePath; * <em>target(arg1, arg2, ...)</em> * </pre> * - * CFGs may contain {@link MethodInvocationNode}s that correspond to no AST - * {@link Tree}, in which case, the tree field will be null. + * CFGs may contain {@link MethodInvocationNode}s that correspond to no AST {@link Tree}, in which + * case, the tree field will be null. * * @author Stefan Heule * @author Charlie Garrett - * */ public class MethodInvocationNode extends Node { @@ -34,8 +30,11 @@ public class MethodInvocationNode extends Node { protected List<Node> arguments; protected TreePath treePath; - public MethodInvocationNode(MethodInvocationTree tree, - MethodAccessNode target, List<Node> arguments, TreePath treePath) { + public MethodInvocationNode( + MethodInvocationTree tree, + MethodAccessNode target, + List<Node> arguments, + TreePath treePath) { super(tree != null ? InternalUtils.typeOf(tree) : target.getMethod().getReturnType()); this.tree = tree; this.target = target; @@ -50,8 +49,7 @@ public class MethodInvocationNode extends Node { } } - public MethodInvocationNode(MethodAccessNode target, List<Node> arguments, - TreePath treePath) { + public MethodInvocationNode(MethodAccessNode target, List<Node> arguments, TreePath treePath) { this(null, target, arguments, treePath); } @@ -105,8 +103,7 @@ public class MethodInvocationNode extends Node { } MethodInvocationNode other = (MethodInvocationNode) obj; - return getTarget().equals(other.getTarget()) - && getArguments().equals(other.getArguments()); + return getTarget().equals(other.getTarget()) && getArguments().equals(other.getArguments()); } @Override |