Show simple item record

Refactoring for parameterizing Java classes

dc.date.accessioned2006-09-07T20:30:25Z
dc.date.accessioned2018-11-24T10:25:04Z
dc.date.available2006-09-07T20:30:25Z
dc.date.available2018-11-24T10:25:04Z
dc.date.issued2006-09-05
dc.identifier.urihttp://hdl.handle.net/1721.1/33965
dc.identifier.urihttp://repository.aust.edu.ng/xmlui/handle/1721.1/33965
dc.description.abstractType safety and expressiveness of many existing Java libraries and theirclient applications would improve, if the libraries were upgraded to definegeneric classes. Efficient and accurate tools exist to assist clientapplications to use generics libraries, but so far the libraries themselvesmust be parameterized manually, which is a tedious, time-consuming, anderror-prone task. We present a type-constraint-based algorithm forconverting non-generic libraries to add type parameters. The algorithmhandles the full Java language and preserves backward compatibility, thusmaking it safe for existing clients. Among other features, it is capableof inferring wildcard types and introducing type parameters formutually-dependent classes. We have implemented the algorithm as a fullyautomatic refactoring in Eclipse.We evaluated our work in two ways. First, our tool parameterized code thatwas lacking type parameters. We contacted the developers of several ofthese applications, and in all cases where we received a response, theyconfirmed that the resulting parameterizations were correct and useful.Second, to better quantify its effectiveness, our tool parameterizedclasses from already-generic libraries, and we compared the results tothose that were created by the libraries' authors. Our tool performed therefactoring accurately -- in 87% of cases the results were as good as thosecreated manually by a human expert, in 9% of cases the tool results werebetter, and in 4% of cases the tool results were worse.
dc.format.extent11 p.
dc.format.extent268513 bytes
dc.format.extent1340485 bytes
dc.language.isoen_US
dc.titleRefactoring for parameterizing Java classes


Files in this item

FilesSizeFormatView
MIT-CSAIL-TR-2006-061.pdf268.5Kbapplication/pdfView/Open
MIT-CSAIL-TR-2006-061.ps1.340Mbapplication/postscriptView/Open

This item appears in the following Collection(s)

Show simple item record