Refactoring Java Code for Automatic API Generation

Genggeng Liu,Chuanshumin Hu,Shihong Chen,Ying Zhang,Xing Chen
DOI: https://doi.org/10.1109/ICCBB.2018.8756413
2018-01-01
Abstract:With the development of the Internet, a large number of computer applications have emerged, and the quantity is still growing rapidly. These applications contain a lot of useful data and functions, however, as most of them are not available and couldn't interact with each other, so the data and functions are difficult to shared and reused, resulting in a huge waste of resources. In order to solve this problem, secondary development is needed on the basis of the source system. For example, it is necessary to collect data from client applications or integrate their functions. Therefore, a framework of automatic encapsulation API based on the client system is proposed in this paper. Firstly, using a design pattern to reconstruct the runtime software architecture. Secondly, an algorithm is proposed for parameter matching to automatically construct API template. Thirdly, a framework is implemented to support design patterns and matching algorithms. In conclusion, we experimented with a real client system, and the results show that in most cases our method can effectively encapsulate and reduce the execution time of the functions.
What problem does this paper attempt to address?