Reengineering of Java Legacy System Based on Aspect-Oriented Programming
Liangyu Chen, Jianlin Wang, Ming Shan Xu, Zhenbing Zeng · 2010
Legacy System is difficult to be maintained and refactored for lack of necessary documents and source codes. How to generate some valuable information from system runtime behaviors is a big challenge to systems reengineering. In this paper, we attempt to reconstruct class diagram and sequence diagram from the binary bytecode of Java program by reflection and bytecode decompilation. The pattern of Aspect-Oriented Programming is applied to resolve the intricate codes of Interface and Dependency Injection pattern through weaving aspect codes into binary bytecodes during runtime to trace the system behaviors. The experiments show our approach can exactly generate the class diagram and sequence diagram from legacy Java System.