This paper presents an optimisation technique which automatically inlines certain classes within their enclosing class. Inlining a class involves inserting the fields and methods of this class into the body of its enclosing class. The enclosing class is the class which declared an instance of the class. The declaration of the inlined class can then be removed from the program. This technique transforms Java programs into an equivalent form, which may be less readable, but is more efficient. The results of the empirical study showed that few classes were found suitable for inlining and that the declassification was not overly successful when optimizing the test programs. One of the advantages of declassification is that it does not result in code bloating. It is thought that further extensions to the declassification technique and an intrinsically object-oriented set of test programs could greatly improve it’s effectiveness.
Bernadette Power, Geoff W. Hamilton