作者shensy及出处http://shensy.iteye.com/blog/1887625
--------------------------------------
实战CGLib系列文章
本篇介绍接口生成器InterfaceMaker。
一、作用:
InterfaceMaker会动态生成一个接口,该接口包含指定类定义的所有方法。
二、示例:
比较简单,先定义一个类,仍使用本系列第一篇中的那个ConcreteClassNoInterface类,该类包含3个方法:
- public class ConcreteClassNoInterface {
- public String getConcreteMethodA(String str){
- System.out.println("ConcreteMethod A ... "+str);
- return str;