xref: /aosp_15_r20/external/apache-commons-bcel/src/site/xdoc/manual/introduction.xml (revision 0c56280ab0842982c46a149f7b9eaa497e31e292)
1*0c56280aSSorin Basca<?xml version="1.0"?>
2*0c56280aSSorin Basca<!--
3*0c56280aSSorin Basca    * Licensed to the Apache Software Foundation (ASF) under one
4*0c56280aSSorin Basca    * or more contributor license agreements.  See the NOTICE file
5*0c56280aSSorin Basca    * distributed with this work for additional information
6*0c56280aSSorin Basca    * regarding copyright ownership.  The ASF licenses this file
7*0c56280aSSorin Basca    * to you under the Apache License, Version 2.0 (the
8*0c56280aSSorin Basca    * "License"); you may not use this file except in compliance
9*0c56280aSSorin Basca    * with the License.  You may obtain a copy of the License at
10*0c56280aSSorin Basca    *
11*0c56280aSSorin Basca    *   http://www.apache.org/licenses/LICENSE-2.0
12*0c56280aSSorin Basca    *
13*0c56280aSSorin Basca    * Unless required by applicable law or agreed to in writing,
14*0c56280aSSorin Basca    * software distributed under the License is distributed on an
15*0c56280aSSorin Basca    * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16*0c56280aSSorin Basca    * KIND, either express or implied.  See the License for the
17*0c56280aSSorin Basca    * specific language governing permissions and limitations
18*0c56280aSSorin Basca    * under the License.
19*0c56280aSSorin Basca-->
20*0c56280aSSorin Basca<document>
21*0c56280aSSorin Basca  <properties>
22*0c56280aSSorin Basca    <title>Introduction</title>
23*0c56280aSSorin Basca  </properties>
24*0c56280aSSorin Basca
25*0c56280aSSorin Basca  <body>
26*0c56280aSSorin Basca
27*0c56280aSSorin Basca  <section name="Introduction">
28*0c56280aSSorin Basca    <p>
29*0c56280aSSorin Basca      The <a href="http://java.sun.com/">Java</a> language has become
30*0c56280aSSorin Basca      very popular and many research projects deal with further
31*0c56280aSSorin Basca      improvements of the language or its run-time behavior. The
32*0c56280aSSorin Basca      possibility to extend a language with new concepts is surely a
33*0c56280aSSorin Basca      desirable feature, but the implementation issues should be hidden
34*0c56280aSSorin Basca      from the user. Fortunately, the concepts of the Java Virtual
35*0c56280aSSorin Basca      Machine permit the user-transparent implementation of such
36*0c56280aSSorin Basca      extensions with relatively little effort.
37*0c56280aSSorin Basca    </p>
38*0c56280aSSorin Basca
39*0c56280aSSorin Basca    <p>
40*0c56280aSSorin Basca      Because the target language of Java is an interpreted language
41*0c56280aSSorin Basca      with a small and easy-to-understand set of instructions (the
42*0c56280aSSorin Basca      <em>byte code</em>), developers can implement and test their
43*0c56280aSSorin Basca      concepts in a very elegant way. One can write a plug-in
44*0c56280aSSorin Basca      replacement for the system's <em>class loader</em> which is
45*0c56280aSSorin Basca      responsible for dynamically loading class files at run-time and
46*0c56280aSSorin Basca      passing the byte code to the Virtual Machine (see <a
47*0c56280aSSorin Basca      href="jvm.html">section 2</a>).
48*0c56280aSSorin Basca      Class loaders may thus be used to intercept the loading process
49*0c56280aSSorin Basca      and transform classes before they get actually executed by the
50*0c56280aSSorin Basca      JVM. While the original class files always remain unaltered, the
51*0c56280aSSorin Basca      behavior of the class loader may be reconfigured for every
52*0c56280aSSorin Basca      execution or instrumented dynamically.
53*0c56280aSSorin Basca    </p>
54*0c56280aSSorin Basca
55*0c56280aSSorin Basca    <p>
56*0c56280aSSorin Basca      The <font face="helvetica,arial">BCEL</font> API (Byte Code
57*0c56280aSSorin Basca      Engineering Library), formerly known as JavaClass, is a toolkit
58*0c56280aSSorin Basca      for the static analysis and dynamic creation or transformation of
59*0c56280aSSorin Basca      Java class files. It enables developers to implement the desired
60*0c56280aSSorin Basca      features on a high level of abstraction without handling all the
61*0c56280aSSorin Basca      internal details of the Java class file format and thus
62*0c56280aSSorin Basca      re-inventing the wheel every time. <font face="helvetica,arial">BCEL
63*0c56280aSSorin Basca    </font> is written entirely in Java and freely available under the
64*0c56280aSSorin Basca      terms of the <a href="license.html">Apache Software License</a>.
65*0c56280aSSorin Basca    </p>
66*0c56280aSSorin Basca
67*0c56280aSSorin Basca    <p>
68*0c56280aSSorin Basca      This manual is structured as follows: We give a brief description
69*0c56280aSSorin Basca      of the Java Virtual Machine and the class file format in <a
70*0c56280aSSorin Basca            href="jvm.html">section 2</a>. <a href="bcel-api.html">Section 3</a>
71*0c56280aSSorin Basca      introduces the <font face="helvetica,arial">BCEL</font> API.
72*0c56280aSSorin Basca      <a href="application-areas.html">Section 4</a> describes some typical
73*0c56280aSSorin Basca      application areas and example projects. The appendix contains code examples
74*0c56280aSSorin Basca      that are to long to be presented in the main part of this paper. All examples
75*0c56280aSSorin Basca      are included in the down-loadable distribution.
76*0c56280aSSorin Basca    </p>
77*0c56280aSSorin Basca  </section>
78*0c56280aSSorin Basca
79*0c56280aSSorin Basca  </body>
80*0c56280aSSorin Basca
81*0c56280aSSorin Basca</document>