@Override
public IResult<TupleLatticeElement<Variable, NullLatticeElement>> transfer(
MethodCallInstruction instr, List<ILabel> labels,
TupleLatticeElement<Variable, NullLatticeElement> value) {
AnnotationSummary summary = annoDB.getSummaryForMethod(instr.resolveBinding());
for (int ndx = 0; ndx < instr.getArgOperands().size(); ndx++) {
Variable paramVar = instr.getArgOperands().get(ndx);
if (summary.getParameter(ndx, BranchingNPEAnalysis.NON_NULL_ANNO) != null) //is this parameter annotated with @Nonnull?
value.put(paramVar, NullLatticeElement.NOT_NULL);
}
if (summary.getReturn(BranchingNPEAnalysis.NON_NULL_ANNO) != null)
value.put(instr.getTarget(), NullLatticeElement.NOT_NULL);
//clearly, the receiver is not null if this method call does actually occur ;)
value.put(instr.getReceiverOperand(), NullLatticeElement.NOT_NULL);