1. A method on an information processing system for automatic replacement of object classes, comprising: performing static analysis on a program containing a plurality of objects in order to determine constraints on the transformations that can be applied and to detect unused functionality in one or more of the objects to be replaced; analyzing the plurality of objects to detect usage patterns of functionality in the one or more objects replaced; analyzing at least one execution of the program to collect profile information for the one or more objects; and generating customized classes based upon the static analysis and the usage patterns detected and the profile information which has been collected.