Automated Refactoring of Legacy Java Software to Enumerated Types
Source: Ohio State University
Java 1.5 introduces several new features that offer significant improvements over older Java technology. In this paper, the authors consider the new enum construct, which provides language support for enumerated types. Prior to Java 1.5, programmers needed to employ various patterns (e.g., the weak enum pattern) to compensate for the absence of enumerated types in Java. Unfortunately, these compensation patterns lack several highly-desirable properties of the enum construct, most notably, type safety. They present a novel fully-automated approach for transforming legacy Java code to use the new enumeration construct.