Member predicate DataFlow::InvokeNode::getArgument
Gets the data flow node corresponding to the i
th argument of this invocation.
For direct calls, this is the i
th argument to the call itself: for instance,
for a call f(x, y)
, the 0th argument node is x
and the first argument node is y
.
For reflective calls using call
, the 0th argument to the call denotes the
receiver, so argument positions are shifted by one: for instance, for a call
f.call(x, y, z)
, the 0th argument node is y
and the first argument node is z
,
while x
is not an argument node at all.
For reflective calls using apply
we cannot, in general, tell which argument
occurs at which position, so this predicate is not defined for such calls.
Note that this predicate is not defined for arguments following a spread
argument: for instance, for a call f(x, ...y, z)
, the 0th argument node is x
,
but the position of z
cannot be determined, hence there are no first and second
argument nodes.
Node getArgument(int i)