this.hierarchy = hierarchy;
}
@SuppressWarnings("unchecked")
public List<SootMethod> getTargetsOf(InstanceInvokeExpr expr) {
Value v = expr.getBase();
SootMethod m = expr.getMethod();
SootClass rc;
Type t = v.getType();
List<SootMethod> targets;
if (t instanceof NullType) {
return Collections.emptyList();
} else if (t instanceof ArrayType) {
rc = Scene.v().getSootClass("java.lang.Object");
targets = Collections.singletonList(hierarchy.resolveConcreteDispatch(rc, m));
} else {
rc = ((RefType) v.getType()).getSootClass();
targets = hierarchy.resolveAbstractDispatch(rc, m);
}
return targets;
}