The ["bytecode engineering library"|http://jakarta.apache.org/bcel/] is a Jakarta package, written in pure Java, which provides the functionality for dynamic synthesization of new Java classes at runtime, either based on injection and reorganization of existing classes, or from scratch. An even more mature and capable library, [CGLIB|http://cglib.sourceforge.net/] has been built on top of BCEL, which is used by many highly popular and robust frameworks such as Hibernate, Spring, and iBatis.

Bytecode engineering is essential to the operation of [AOP] but has more harmless and productive uses. Part of CGLib is [FastClass], a drop-in replacement for the JDK reflection functionality which offers a truly vast 20-30x improvement in speed.