Java has the ability to create classes at runtime. These classes are known as Synthetic Classes or Dynamic Proxies.
See http://java.sun.com/j2se/1.5.0/docs/guide/reflection/proxy.html for more information.
Other open-source libraries, such as CGLIB and ASM also allow you to generate synthetic classes, and are more powerful than the libraries provided with the JRE.
Synthetic classes are used by AOP (Aspect Oriented Programming) libraries such as Spring AOP and AspectJ, as well as ORM libraries such as Hibernate.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…