public ConsList<Binding> matches(TypeHierarchy types, Method method, TACInstruction instr) {
if (!(instr instanceof NewObjectInstruction))
return null;
NewObjectInstruction newObj = (NewObjectInstruction) instr;
IMethodBinding binding = newObj.resolveBinding();
if (binding.getParameterTypes().length != paramTypes.length)
return null;
if (!types.existsCommonSubtype(type, binding.getDeclaringClass().getQualifiedName()))
return null;
for (int ndx = 0; ndx < paramTypes.length; ndx++)
if (!types.existsCommonSubtype(paramTypes[ndx], binding.getParameterTypes()[ndx].getQualifiedName()))
return null;
ConsList<Binding> vars = ConsList.empty();
vars = ConsList.cons(new Binding(ret, newObj.getTarget()), vars);
for (int ndx = 0; ndx < params.length; ndx++)
vars = ConsList.cons(new Binding(params[ndx], newObj.getArgOperands().get(ndx)), vars);
return vars;
}