摘要
接口是Java程序中广泛使用的基本组件。但它一旦定义,就不能轻易改变。对一个已拥有大量实现类的接口,进行诸如方法添加、参数变更等修改是困难的。通过实现一个框架,在运行时自动为已完成的实现类注入新的方法代码,可以帮助解决这一问题,使它不再成为软件系统更新优化的障碍。
Interface is a widely-used component in JAVA programming. But once it is defined, it cannot be easily changed. It is difficult to revise an interface which has implemented by a huge amount of classes. This article will introduce a framework which automatically injects new code into old classes at runtime, making it no longer an obstacle to system update and optimization.
出处
《微型电脑应用》
2013年第8期62-64,共3页
Microcomputer Applications