The programming model is elegant , and the constructor - based style means you don t have to include a constructor without arguments 这样就差不多了。编程模型是优雅的,基于构造函数的风格意味着您无需包括无参构造函数。
Interface with javassist is easy - i just need to create a new class that implements the interface , add a member variable for the target object reference , and finish by adding a no - argument constructor and the simple implementation methods 接口生成实现类很容易只需要创建一个实现了这个接口的新类、为目标对象引用添加一个成员变量、最后再添加一个无参构造函数和简单实现方法。