HOME

TheInfoList



OR:

The Byte Code Engineering Library (BCEL) is a project sponsored by the
Apache Foundation The Apache Software Foundation (ASF) is an American nonprofit corporation (classified as a 501(c)(3) organization in the United States) to support a number of open source software projects. The ASF was formed from a group of developers of the Ap ...
previously under their
Jakarta Jakarta (; , bew, Jakarte), officially the Special Capital Region of Jakarta ( id, Daerah Khusus Ibukota Jakarta) is the capital city, capital and list of Indonesian cities by population, largest city of Indonesia. Lying on the northwest coa ...
charter to provide a simple API for decomposing, modifying, and recomposing binary
Java Java (; id, Jawa, ; jv, ꦗꦮ; su, ) is one of the Greater Sunda Islands in Indonesia. It is bordered by the Indian Ocean to the south and the Java Sea to the north. With a population of 151.6 million people, Java is the world's mo ...
classes (I.e.
bytecode Bytecode (also called portable code or p-code) is a form of instruction set designed for efficient execution by a software interpreter. Unlike human-readable source code, bytecodes are compact numeric codes, constants, and references (norma ...
). 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: *Java Bytecode Decompiling, Obfuscation, and Refactoring *Performance and Profiling :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.) *Implementation of New Language Semantics :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) *
Static code analysis In computer science, static program analysis (or static analysis) is the analysis of computer programs performed without executing them, in contrast with dynamic program analysis, which is performed on programs during their execution. The term ...
: FindBugs uses BCEL to analyze Java bytecode for code idioms which indicate bugs.


See also

*
ObjectWeb ASM The ASM library is a project of the OW2 consortium. It provides a simple API for decomposing, modifying, and recomposing binary Java classes (i.e. bytecode). The project was originally conceived and developed by Eric Bruneton. ASM is Java-centric a ...
* Javassist


External links


Apache Commons BCEL
- The BCEL Project Home Page.

- A listing of projects that make use of the BCEL Library.
Apache Jakarta Home
- The Apache Jakarta Home Page.
AspectJ
- The AspectJ Project Home Page. (One of the high-visibility projects that makes use of BCEL.) {{Apache Software Foundation Virtualization software