Java动态代理 CGLib
jopen
13年前
<p>CGLib (Code Generation Library) 是一个强大的,高性能,高质量的Code生成类库。它可以在运行期扩展Java类与实现Java接口。Hibernate用它来实现PO字节码的动态生成。CGLib 比 Java 的 java.lang.reflect.Proxy 类更强的在于它不仅可以接管接口类的方法,还可以接管普通类的方法。<br /> <br /> 以下是cglib所使用和使用cglib的开源项目: </p> <ul> <li><br /> </li> "The <a href="/misc/goto?guid=4959499954485524351">Byte Code Engineering Library </a>(formerly known as JavaClass) is intended to give users a convenient possibility to analyze, create, and manipulate (binary) Java class files (those ending with .class)." Used by cglib for Class file format manipulation. <li><br /> </li> " <a href="/misc/goto?guid=4959499954570332634">XORM </a>is an extensible object-relational mapping layer for Java applications. It provides interface-based persistence to RDBMSs while allowing developers to focus on the object model, not the physical layer." Uses cglib to generate persistent classes. <li><br /> </li> " <a href="/misc/goto?guid=4959499954656714920">Hibernate </a>is a powerful, ultra-high performance object/relational persistence and query service for Java. Hibernate lets you develop persistent objects following common Java idiom, including association, inheritance, polymorphism, composition and the Java collections framework." Uses cglib to generate proxies for persistent classes. <li><br /> </li> " <a href="/misc/goto?guid=4959499954732819593">The Java Class File Editor </a>allows you to read / modify java .class files, either on disk or while loading classes at runtime. The project grew out of the Generic Delegator, which creates new classes on the fly, allowing you to dynamically implement a group of interfaces by forwarding them to a shim" Both cglib and JCFE provide dynamic proxy implementation <li><br /> </li> " <a href="/misc/goto?guid=4959499954896981613">Voruta </a>reduces JDBC code in application, it makes code more readable and safe, SQL procedures and queries are mapped to JAVA methods using custom javadoc tags and dynamic code generation at runtime. It needs no custom build tools or external files" Uses cglib to generate method implementations. <li><br /> </li> " <a href="/misc/goto?guid=4959499954973325148">Nanning Aspects </a>is a simple yet scaleable aspect-oriented framework for Java." <li><br /> </li> " <a href="/misc/goto?guid=4959499863775502232">Spring </a>is a J2EE application framework based on code published in Expert One-on-One J2EE Design and Development http://www.wrox.com/books/1861007841.htm by Rod Johnson." <li><br /> </li> " <a href="/misc/goto?guid=4959499955078393318">The iBATIS Database Layer </a>takes a different approach to solving the Object Relational mapping problem --it avoids it altogether!" <li><br /> </li> " <a href="/misc/goto?guid=4959499955158555541">ASM </a>is a Java bytecode manipulation framework. It offers similar functionalities as BCEL or SERP, but is much more smaller and faster than these tools." <li><br /> </li> " <a href="/misc/goto?guid=4959499955241881696">Proxool </a>is a Java connection pool." </ul> <p></p> <p><strong>项目主页:</strong><a href="http://www.open-open.com/lib/view/home/1324994305108" target="_blank">http://www.open-open.com/lib/view/home/1324994305108</a></p>