OOPSLA '04

Program
Technical Program
  Invited Speakers
  Technical Papers
  Onward!
  Panels
  Practitioner Reports
  Tutorials
Workshops
DesignFest
Educators' Symposium
Demonstrations
Posters
Doctoral Symposium
Exhibits
Student Research Comp.
FlashBoF
 
Turing Lecture
 
Social Events
 
Week at a Glance
 
Final Program (1.5M .pdf)

Find in Program
 

Page
Printer-friendly

Basket
view, help

"Converting Java Classes to Use Generics"
Object-Oriented Programming, Systems, Languages and Applications
Home    Program    Housing & Transportation    Registration    Submissions    Wiki    Maps
 
  > Technical Program > Technical Papers > Generics

 : Tuesday

Converting Java Classes to Use Generics

Ballroom A-B
Tuesday, 10:30, 30 minutes
 


 
7·8·9·10·11·12·13·14·15·16·17·18·19·20·21

Daniel von Dincklage, University of Colorado
Amer Diwan, University of Colorado

Generics offer significant software engineering benefits since they provide code reuse without compromising type safety. Thus generics will be added to the Java language in the near future. While this extension to Java will help programmers when they are writing new code, it will not help legacy code unless it is rewritten to use generics. In our experience, manually modifying existing programs to use generics is error prone and labor intensive.

We describe a system, \sysnamenospace, that (i) converts non-generic classes to generic classes and (ii) rewrites the clients of the previously non-generic class to use the generic class. Our preliminary to generic classes and (ii) rewrites their clients to use the newly generified classes. Our experiments with a number of Java container classes show that our system is effective in modifying legacy code to use generics.