Byte Code Engineering Library

Jakarta BCEL
Developer(s) Apache Software Foundation
Stable release 5.2 / June 6, 2006 (2006-06-06)
Written in Java
Operating system Cross-platform
Type Bytecode Engineering Library
License Apache License 2.0
Website http://commons.apache.org/bcel/

The Byte Code Engineering Library (BCEL) is a project sponsored by the Apache Foundation previously under their Jakarta charter to provide a simple API for decomposing, modifying, and recomposing binary Java classes (I.e. bytecode). The project was conceived and developed by Markus Dahm prior to officially being donated to the Apache Jakarta foundation on 27 October 2001.

Uses

BCEL provides a simple library that exposes the internal aggregate components of a given Java class through its API as object constructs (as opposed to the disassembly of the lower-level opcodes). These objects also expose operations for modifying the binary bytecode, as well as generating new bytecode (via injection of new code into the existing code, or through generation of new classes altogether.) The BCEL library has been used in several diverse applications, such as:

Instrumentation calls that capture performance metrics can be injected into Java class binaries to examine memory/coverage data. (For example, injecting instrumentation at entry/exit points.)
For example, Aspect-Oriented additions to the Java language have been implemented by using BCEL to decompose class structures for point-cut identification, and then again when reconstituting the class by injecting aspect-related code back into the binary. (See: AspectJ)
FindBugs uses BCEL to analyze Java bytecode for code idioms which indicate bugs.

See also

External links

This article is issued from Wikipedia - version of the Wednesday, December 11, 2013. The text is available under the Creative Commons Attribution/Share Alike but additional terms may apply for the media files.