Patent ID: 7802239

Claim:
A machine-readable medium carrying one or more sequences of instructions, which instructions, when executed by one or more processors, cause the one or more processors to carry out the steps of: locating, within source code, a first method invocation for a first programmatic method, wherein the first method invocation passes the first programmatic method a first argument as a first parameter; determining whether the first argument references a second programmatic method; based on a determination that the first argument references the second programmatic method: determining an expected type for the first parameter; determining a first object-oriented programming (OOP) class defining the expected type; determining an interface implemented by the first OOP class; generating a first compiled code for a second OOP class that implements the interface, wherein the first compiled code comprises a third programmatic method defined for the second OOP class, and wherein the third programmatic method invokes the second programmatic method; and modifying a second compiled code generated for the first method invocation such that the first argument for the first method invocation references an instance of the second OOP class.