use of soot.jimple.spark.pag.FieldRefNode in project soot by Sable.
the class SootUtil method storesOnField.
public static FieldToEdgesMap storesOnField(PAG pag) {
FieldToEdgesMap storesOnField = new FieldToEdgesMap();
Iterator frNodeIter = pag.storeInvSourcesIterator();
while (frNodeIter.hasNext()) {
FieldRefNode frNode = (FieldRefNode) frNodeIter.next();
VarNode source = frNode.getBase();
SparkField field = frNode.getField();
Node[] targets = pag.storeInvLookup(frNode);
for (int i = 0; i < targets.length; i++) {
VarNode target = (VarNode) targets[i];
storesOnField.put(field, new Pair<VarNode, VarNode>(target, source));
}
}
return storesOnField;
}
Aggregations