• Home
Name Date Size #Lines LOC

..--

sample/03-May-2024-1,9761,301

src/03-May-2024-111,93281,481

tutorial/03-May-2024-3,2372,581

.gitignoreD03-May-2024117 1614

Android.bpD03-May-20241.3 KiB5044

LICENSED03-May-202411.1 KiB203169

License.htmlD03-May-202425.3 KiB374369

METADATAD03-May-2024463 1917

MODULE_LICENSE_APACHE2D03-May-20240

README.mdD03-May-20241.4 KiB4130

README.versionD03-May-2024118 43

Readme.htmlD03-May-202427.2 KiB880688

build.xmlD03-May-202411.7 KiB326275

pom.xmlD03-May-202410.5 KiB335285

README.md

1Java bytecode engineering toolkit
2### [Javassist version 3](http://www.javassist.org)
3
4Copyright (C) 1999-2018 by Shigeru Chiba, All rights reserved.
5
6Javassist (JAVA programming ASSISTant) makes Java bytecode manipulation
7simple. It is a class library for editing bytecodes in Java; it enables Java
8programs to define a new class at runtime and to modify a class file when the
9JVM loads it. Unlike other similar bytecode editors, Javassist provides two
10levels of API: source level and bytecode level. If the users use the source-
11level API, they can edit a class file without knowledge of the specifications
12of the Java bytecode. The whole API is designed with only the vocabulary of
13the Java language. You can even specify inserted bytecode in the form of
14source text; Javassist compiles it on the fly. On the other hand, the
15bytecode-level API allows the users to directly edit a class file as other
16editors.
17
18This software is distributed under the Mozilla Public License Version 1.1,
19the GNU Lesser General Public License Version 2.1 or later, or
20the Apache License Version 2.0.
21
22#### Files
23
24  * [Readme.html](Readme.html)
25Readme file (a longer version of this file).
26
27  * [License.html](License.html)
28License file
29
30  * [tutorial/tutorial.html](tutorial/tutorial.html)
31Tutorial
32
33  * ./javassist.jar
34The Javassist jar file (class files)
35
36  * ./src/main
37The source files
38
39  * [html/index.html](html/index.html)
40The top page of the Javassist API document.
41

README.version

1URL: https://github.com/jboss-javassist/javassist/archive/rel_3_14_0_ga.tar.gz
2Version: 3.14.0.GA
3BugComponent: 33621
4

Readme.html

1<html>
2<HEAD>
3   <META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=iso-8859-1">
4   <TITLE>Read Me First</TITLE>
5</HEAD>
6<body>
7
8<h1>Javassist version 3</h1>
9
10<h3>Copyright (C) 1999-2018 by Shigeru Chiba, All rights reserved.</h3>
11
12<p><br></p>
13
14<p>Javassist (JAVA programming ASSISTant) makes Java bytecode manipulation
15simple.  It is a class library for editing bytecodes in Java;
16it enables Java programs to define a new class at runtime and to
17modify a class file when the JVM loads it.  Unlike other similar
18bytecode editors, Javassist provides two levels of API: source level
19and bytecode level.  If the users use the source-level API, they can
20edit a class file without knowledge of the specifications of the Java
21bytecode.  The whole API is designed with only the vocabulary of the
22Java language.  You can even specify inserted bytecode in the form of
23source text; Javassist compiles it on the fly.  On the other hand, the
24bytecode-level API allows the users to directly edit a class file as
25other editors.
26
27<p><br>
28
29<h2>Files</h2>
30
31<ul>
32<table>
33<tr>
34<td><li><tt><a href="License.html">License.html</a></tt></td>
35<td>License file (MPL/LGPL/Apache triple license)
36(Also see the <a href="#copyright">copyright notices</a> below)</td>
37</tr>
38
39<tr>
40<td><li><tt><a href="tutorial/tutorial.html">tutorial/tutorial.html</a></tt></td>
41<td>Tutorial</td>
42</tr>
43
44<tr>
45<td><li><tt>./javassist.jar</tt></td>
46<td>The Javassist jar file (class files)</td>
47</tr>
48
49<tr>
50<td><li><tt>./src/main</tt></td>
51<td>The source files</td>
52</tr>
53
54<tr>
55<td><li><tt><a href="html/index.html">html/index.html</a></tt></td>
56<td>The top page of the Javassist API document.</td>
57</tr>
58
59<tr>
60<td><li><tt>./sample/</tt></td>
61<td>Sample programs</td>
62</tr>
63</table>
64</ul>
65
66<p><br>
67
68<h2>How to run sample programs</h2>
69
70<p>JDK 1.4 or later is needed.
71
72<h3>0. If you have Apache Ant</h3>
73
74<p>Run the sample-all task.
75Otherwise, follow the instructions below.
76
77<h3>1. Move to the directory where this Readme.html file is located.</h3>
78
79<p>In the following instructions, we assume that the javassist.jar
80file is included in the class path.
81For example, the javac and java commands must receive
82the following <code>classpath</code> option:
83
84<ul><pre>
85-classpath ".:javassist.jar"
86</pre></ul>
87
88<p>If the operating system is Windows, the path
89separator must be not <code>:</code> (colon) but
90<code>;</code> (semicolon).  The java command can receive
91the <code>-cp</code> option
92as well as <code>-classpath</code>.
93
94<p>If you don't want to use the class-path option, you can make
95<code>javassist.jar</code> included in the <code>CLASSPATH</code>
96environment:
97
98<ul><pre>
99export CLASSPATH=.:javassist.jar
100</pre></ul>
101
102<p>or if the operating system is Windows:
103
104<ul><pre>
105set CLASSPATH=.;javassist.jar
106</pre></ul>
107
108
109<p>Otherwise, you can copy <tt>javassist.jar</tt> to the directory
110
111<ul>&lt;<i>java-home</i>&gt;<tt>/jre/lib/ext</tt>.</ul>
112
113<p>&lt;<i>java-home</i>&gt; depends on the system.  It is usually
114<tt>/usr/local/java</tt>, <tt>c:\j2sdk1.4\</tt>, etc.
115
116<h3>2. sample/Test.java</h3>
117
118<p>   This is a very simple program using Javassist.
119
120<p>   To run, type the commands:
121
122<ul><pre>
123% javac sample/Test.java
124% java sample.Test
125</pre></ul>
126
127<p>   For more details, see <a type="text/plain" href="sample/Test.java">sample/Test.java</a>
128
129<h3>3. sample/reflect/*.java</h3>
130
131<p>   This is the "verbose metaobject" example well known in reflective
132   programming.  This program dynamically attaches a metaobject to
133   a Person object.  The metaobject prints a message if a method
134   is called on the Person object.
135
136<p>   To run, type the commands:
137
138<ul><pre>
139% javac sample/reflect/*.java
140% java javassist.tools.reflect.Loader sample.reflect.Main Joe
141</pre></ul>
142
143<p>Compare this result with that of the regular execution without reflection:
144
145<ul><pre>% java sample.reflect.Person Joe</pre></ul>
146
147<p>   For more details, see <a type="text/plain" href="sample/reflect/Main.java">sample/reflect/Main.java</a>
148
149<p>   Furthermore, the Person class can be statically modified so that
150   all the Person objects become reflective without sample.reflect.Main.
151   To do this, type the commands:
152
153<ul><pre>
154% java javassist.tools.reflect.Compiler sample.reflect.Person -m sample.reflect.VerboseMetaobj
155</pre></ul>
156
157<p>   Then,
158<ul><pre>
159% java sample.reflect.Person Joe
160</pre></ul>
161
162<h3>4. sample/duplicate/*.java</h3>
163
164<p>   This is another example of reflective programming.
165
166<p>   To run, type the commands:
167
168<ul><pre>
169% javac sample/duplicate/*.java
170% java sample.duplicate.Main
171</pre></ul>
172
173<p>Compare this result with that of the regular execution without reflection:
174
175<ul><pre>% java sample.duplicate.Viewer</pre></ul>
176
177<p>For more details, see
178<a type="text/plain" href="sample/duplicate/Main.java">sample/duplicate/Main.java</a>
179
180<h3>5. sample/vector/*.java</h3>
181
182<p>This example shows the use of Javassit for producing a class representing
183a vector of a given type at compile time.
184
185<p>   To run, type the commands:
186<ul><pre>
187% javac sample/vector/*.java
188% java sample.preproc.Compiler sample/vector/Test.j
189% javac sample/vector/Test.java
190% java sample.vector.Test
191</pre></ul>
192
193<p>Note: <code>javassist.jar</code> is unnecessary to compile and execute
194<code>sample/vector/Test.java</code>.
195
196For more details, see
197<a type="text/plain" href="sample/vector/Test.j">sample/vector/Test.j</a>
198and <a type="text/plain" href="sample/vector/VectorAssistant.java">sample/vector/VectorAssistant.java</a>
199
200<h3>6. sample/rmi/*.java</h3>
201
202<p>   This demonstrates the javassist.rmi package.
203
204<p>   To run, type the commands:
205<ul><pre>
206% javac sample/rmi/*.java
207% java sample.rmi.Counter 5001
208</pre></ul>
209
210<p>   The second line starts a web server listening to port 5001.
211
212<p>   Then, open <a href="sample/rmi/webdemo.html">sample/rmi/webdemo.html</a>
213with a web browser running
214   on the local host.  (<tt>webdemo.html</tt> trys to fetch an applet from
215   <tt>http://localhost:5001/</tt>, which is the web server we started above.)
216
217<p>   Otherwise, run sample.rmi.CountApplet as an application:
218
219<ul><pre>
220% java javassist.web.Viewer localhost 5001 sample.rmi.CountApplet
221</pre></ul>
222
223<h3>7. sample/evolve/*.java</h3>
224
225<p>   This is a demonstration of the class evolution mechanism implemented
226   with Javassist.  This mechanism enables a Java program to reload an
227   existing class file under some restriction.
228
229<p>   To run, type the commands:
230<ul><pre>
231% javac sample/evolve/*.java
232% java sample.evolve.DemoLoader 5003
233</pre></ul>
234
235<p>   The second line starts a class loader DemoLoader, which runs a web
236   server DemoServer listening to port 5003.
237
238<p>   Then, open <a href="http://localhost:5003/demo.html">http://localhost:5003/demo.html</a> with a web browser running
239   on the local host.
240(Or, see <a href="sample/evolve/start.html">sample/evolve/start.html</a>.)
241
242<h3>8. sample/hotswap/*.java</h3>
243
244<p>This shows dynamic class reloading by the JPDA.  It needs JDK 1.4 or later.
245To run, first type the following commands:
246
247<ul><pre>
248% cd sample/hotswap
249% javac *.java
250% cd logging
251% javac *.java
252% cd ..
253</pre></ul>
254
255<p>If your Java is 1.4, then type:
256
257<ul><pre>
258% java -Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=n,address=8000 Test
259</pre></ul>
260
261<p>If you are using Java 5, then type:
262
263<ul><pre>
264% java -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=8000 Test
265</pre></ul>
266
267<p>Note that the class path must include <code>JAVA_HOME/lib/tools.jar</code>.
268
269<h2>Hints</h2>
270
271<p>To know the version number, type this command:
272
273<ul><pre>
274% java -jar javassist.jar
275</pre></ul>
276
277<p>Javassist provides a class file viewer for debugging.  For more details,
278see javassist.Dump.
279
280<p><br>
281
282<h2>Changes</h2>
283
284<p>-version 3.24.1 on December 9, 2018
285<ul>
286    <li>GitHub Issue #228, #229</li>
287<ul>
288</p>
289
290<p>-version 3.24 on November 1, 2018
291<ul>
292    <li>Java 11 supports.</li>
293    <li>JIRA JASSIST-267.</li>
294    <li>Github PR #218.</li>
295</ul>
296</p>
297
298<p>-version 3.23.1 on July 2, 2018
299<ul>
300    <li>Github PR #171.</li>
301</ul>
302</p>
303
304<p>-version 3.23 on June 21, 2018
305
306<ul>
307    <li>Fix leaking file handlers in ClassPool and removed ClassPath.close(). Github issue #165.
308</ul>
309</p>
310
311<p>-version 3.22 on October 10, 2017
312
313<ul>
314<li>Java 9 supports.
315<li>JIRA JASSIST-261.
316</ul>
317</p>
318
319<p>-version 3.21 on October 4, 2016
320<ul>
321<li>JIRA JASSIST-244, 245, 248, 250, 255, 256, 259, 262.
322<li><code>javassist.tools.Callback</code> was modified to be Java 1.4 compatible.
323The parameter type of <code>Callback#result()</code> was changed.
324<li>The algorithm for generating a stack-map table was modified to fix github issue #83.
325<li>A bug of ProxyFactory related to default methods was fixed.  It is github issue #45.
326</ul>
327</p>
328
329<p>-version 3.20 on June 25, 2015
330<ul>
331<li>JIRA JASSIST-241, 242, 246.
332</ul>
333</p>
334
335
336<p>-version 3.19 on January 6, 2015
337<ul>
338<li>JIRA JASSIST-158, 205, 206, 207, 208, 209, 211, 212, 216, 220, 223, 224,
339        227, 230, 234, 235, 236, 237, 238, 240.
340</ul>
341</p>
342
343<p>-version 3.18 on June 3, 2013
344<ul>
345<li>The source code repository has been moved to <a href="https://github.com/jboss-javassist/javassist">GitHub</a></li>.
346
347<li>JIRA JASSIST-181, 183, 184, 189, 162, 185, 186, 188, 190, 195, 199, 201.
348</ul>
349
350<p>-version 3.17.1 on December 3, 2012
351<ul>
352	<li>JIRA JASSIST-177, 178, 182.
353</ul>
354
355
356<p>-version 3.17 on November 8, 2012
357<ul>
358	<li>OSGi bundle info is now included in the jar file.
359	<li>A stackmap generator has been rewritten.
360	<li>JIRA JASSIST-160, 163, 166, 168, 170, 171, 174, 175, 176 have been fixed.
361</ul>
362
363<p>-version 3.16.1 on March 6, 2012
364<ul>
365	<li>Maven now works.  JIRA JASSIST-44, 106, 156 have been fixed.
366</ul>
367
368<p>-version 3.16 on February 19, 2012
369<ul>
370	<li>JIRA JASSIST-126, 127, 144, 145, 146, 147, 149, 150, 151, 152, 153, 155.
371	<li><code>javassist.bytecode.analysis.ControlFlow</code> was added.
372	<li>Java 7 compatibility.
373</ul>
374
375<p>-version 3.15 on July 8, 2011
376<ul>
377   	<li>The license was changed to MPL/LGPL/Apache triple.
378   	<li>JIRA JASSIST-138 and 142 were fixed.
379</ul>
380
381<p>-version 3.14 on October 5, 2010
382
383<ul>
384	<li>JIRA JASSIST-121, 123, 128, 129, 130, 131, 132.
385</ul>
386
387<p>-version 3.13 on July 19, 2010
388
389<ul>
390	<li>JIRA JASSIST-118, 119, 122, 124, 125.
391</ul>
392
393<p>-version 3.12.1 on June 10, 2010
394
395<p>-version 3.12 on April 16, 2010
396
397<p>-version 3.11 on July 3, 2009
398<ul>
399	<li>JIRA JASSIST-67, 68, 74, 75, 76, 77, 81, 83, 84, 85, 86, 87 were fixed.
400	<li>Now javassist.bytecode.CodeIterator can insert a gap into
401	a large method body more than 32KB.  (JIRA JASSIST-79, 80)
402</ul>
403
404<p>-version 3.10 on March 5, 2009
405
406<ul>
407	<li>JIRA JASSIST-69, 70, 71 were fixed.
408</ul>
409
410<p>-version 3.9 on October 9, 2008
411<ul>
412	<li>ClassPool.makeClassIfNew(InputStream) was implemented.
413	<li>CtNewMethod.wrapped(..) and CtNewConstructor.wrapped(..)
414	implicitly append a method like _added_m$0.
415	This method now has a synthetic attribute.
416    <li>JIRA JASSIST-66 has been fixed.
417</ul>
418
419<p>-version 3.8.1 on July 17, 2008
420<ul>
421	<li>CtClass.rebuildClassFile() has been added.
422	<li>A few bugs of javassist.bytecode.analysis have been fixed.
423	3.8.0 could not correctly deal with one letter class name
424	such as I and J.
425</ul>
426
427<p>-version 3.8.0 on June 13, 2008
428<ul>
429    <li>javassist.bytecode.analysis was implemented.
430  	<li>JASSIST-45, 47, 51, 54-57, 60, 62 were fixed.
431</ul>
432
433<p>-version 3.7.1 on March 10, 2008
434<ul>
435    <li>a bug of javassist.util.proxy has been fixed.
436</ul>
437
438<p>-version 3.7 on January 20, 2008
439<ul>
440	<li>Several minor bugs have been fixed.
441</ul>
442
443<p>-version 3.6.0 on September 13, 2007
444
445<p>-version 3.6.0.CR1 on July 27, 2007
446
447<ul>
448    <li>The stack map table introduced since Java 6 has been supported.
449    <li>CtClass#getDeclaredBehaviors() now returns a class initializer
450        as well as methods and constructors.
451    <li>The default status of automatic pruning was made off.
452        Instead of pruning, this version of Javassist compresses
453        the data structure of a class file after toBytecode() is called.
454        The compressed class file is automatically decompressed when needed.
455        This saves memory space better than pruning.
456    <li><a href="http://jira.jboss.com/jira/browse/JASSIST-33">JIRA JASSIST-33</a> has been fixed.
457</ul>
458
459<p>-version 3.5 on April 29, 2007
460<ul>
461	<li>Various minor updates.
462</ul>
463
464<p>-version 3.4 on November 17, 2006
465<ul>
466	<li>A bug in CodeConverter#replaceFieldRead() and CodeConverter#replaceFieldWrite()
467	was fixed. <a href="http://jira.jboss.com/jira/browse/JBAOP-284">JBAOP-284</a>.
468
469    <li>A synchronization bug and a performance bug in <code>javassist.util.proxy</code>
470    have been fixed
471    (<a href="http://jira.jboss.com/jira/browse/JASSIST-28">JASSIST-28</a>).
472    Now generated proxy classes are cached.  To turn the caching off,
473    set <code>ProxyFactory.useCache</code> to <code>false</code>.
474</ul>
475
476<p>-version 3.3 on August 17, 2006
477<ul>
478    <li>CtClass#toClass() and ClassPool#toClass() were modified to accept a
479    <code>ProtectionDomain</code>
480    (<a href="http://jira.jboss.com/jira/browse/JASSIST-23">JASSIST-23</a>).
481    Now ClassPool#toClass(CtClass, ClassLoader) should not be overridden.  All
482    subclasses of ClassPool must override toClass(CtClass, ClassLoader,
483    ProtectionDomain).
484
485    <li>CtClass#getAvailableAnnotations() etc. have been implemented.
486
487    <li>A bug related to a way of dealing with a bridge method was fixed
488    (<a href="http://jira.jboss.com/jira/browse/HIBERNATE-37">HIBERNATE-37</a>).
489
490    <li>javassist.scopedpool package was added.
491</ul>
492
493<p>-version 3.2 on June 21, 2006
494
495<ul>
496	<li>The behavior of CtBehavior#getParameterAnnotations() has been changed.
497	It is now compatible to Java Reflection API
498	(<a href="http://jira.jboss.com/jira/browse/JASSIST-19">JASSIST-19</a>).
499</ul>
500
501<p>- version 3.2.0.CR2 on May 9, 2006
502<ul>
503   <li>A bug of replace(String,ExprEditor) in javassist.expr.Expr has been fixed.
504  <li>Updated ProxyFactory getClassLoader to choose the javassit class loader
505   when the proxy superclass has a null class loader (a jdk/endorsed class)
506   (<a href='http://jira.jboss.com/jira/browse/JASSIST-18'>JASSIST-18</a>).
507  <li>Updated the throws clause of the javassist.util.proxy.MethodHandler
508   to be Throwable rather than Exception
509   (<a href='http://jira.jboss.com/jira/browse/JASSIST-16'>JASSIST-16</a>).
510</ul>
511
512<p>- version 3.2.0.CR1 on March 18, 2006
513<ul>
514  <li>Annotations enhancements to javassist.bytecode.MethodInfo.
515  <li>Allow a ClassPool to override the "guess" at the classloader to use.
516</ul>
517
518<p>- version 3.1 on February 23, 2006
519
520<ul>
521  <li>getFields(), getMethods(), and getConstructors() in CtClass
522    were changed to return non-private memebers instead of only
523    public members.
524  <li>getEnclosingClass() in javassist.CtClass was renamed
525      to getEnclosingMethod().
526  <li>getModifiers() was extended to return Modifier.STATIC if the class
527      is a static inner class.
528  <li>The return type of CtClass.stopPruning() was changed from void
529    to boolean.
530  <li>toMethod() in javassist.CtConstructor has been implemented.
531  <li>It includes new javassist.util.proxy package
532      similar to Enhancer of CGLIB.
533  <p>
534  <li>The subpackages of Javassist were restructured.
535  <ul>
536    <li>javassist.tool package was renamed to javassist.tools.
537    <li>HotSwapper was moved to javassist.util.
538    <li>Several subpackages were moved to javassist.tools.
539    <li>javassist.preproc package was elminated and the source was
540        moved to the sample directory.
541  </ul>
542</ul>
543
544<p>- version 3.1 RC2 on September 7, 2005
545
546<ul>
547  <li>RC2 is released mainly for an administrative reason.
548  <li>A few bugs have been fixed.
549</ul>
550
551<p>- version 3.1 RC1 on August 29, 2005
552
553<ul>
554  <li>Better annotation supports.  See <code>CtClass.getAnnotations()</code>
555  <li>javassist.tool.HotSwapper was added.
556  <li>javassist.ClassPool.importPackage() was added.
557  <li>The compiler now accepts array initializers
558    (only one dimensional arrays).
559  <li>javassist.Dump was moved to javassist.tool.Dump.
560  <li>Many bugs were fixed.
561</ul>
562
563<p>- version 3.0 on January 18, 2005
564
565<ul>
566  <li>The compiler now supports synchronized statements and finally
567  clauses.
568  <li>You can now remove a method and a field.
569</ul>
570
571<p>- version 3.0 RC1 on September 13, 2004.
572
573<ul>
574  <li>CtClass.toClass() has been reimplemented.  The behavior has been
575      changed.
576  <li>javassist.expr.NewArray has been implemented.  It enables modifying
577      an expression for array creation.
578  <li><code>.class</code> notation has been supported.  The modified class
579      file needs javassist.runtime.DotClass at runtime.
580  <li>a bug in <code>CtClass.getMethods()</code> has been fixed.
581  <li>The compiler supports a switch statement.
582</ul>
583
584<p>- version 3.0 beta on May 18th, 2004.
585
586<ul>
587  <li>The ClassPool framework has been redesigned.
588     <ul>
589     <li>writeFile(), write(), ... in ClassPool have been moved to CtClass.
590     <li>The design of javassist.Translator has been changed.
591     </ul>
592
593  <li>javassist.bytecode.annotation has been added for meta tags.
594  <li>CtClass.makeNestedClass() has been added.
595  <li>The methods declared in javassist.bytecode.InnerClassesAttribute
596      have been renamed a bit.
597  <li>Now local variables were made available in the source text passed to
598  CtBehavior.insertBefore(), MethodCall.replace(), etc.
599  <li>CtClass.main(), which prints the version number, has been added.
600  <li>ClassPool.SimpleLoader has been public.
601  <li>javassist.bytecode.DeprecatedAttribute has been added.
602  <li>javassist.bytecode.LocalVariableAttribute has been added.
603  <li>CtClass.getURL() and javassist.ClassPath.find() has been added.
604  <li>CtBehavior.insertAt() has been added.
605  <li>CtClass.detach() has been added.
606  <li>CodeAttribute.computeMaxStack() has been added.
607</ul>
608
609<p>- version 2.6 in August, 2003.
610
611<ul>
612  <li>The behavior of CtClass.setSuperclass() was changed.
613      To obtain the previous behavior, call CtClass.replaceClassName().
614  <li>CtConstructor.setBody() now works for class initializers.
615  <li>CtNewMethod.delegator() now works for static methods.
616  <li>javassist.expr.Expr.indexOfBytecode() has been added.
617  <li>javassist.Loader has been modified so that getPackage() returns
618      a package object.
619  <li>Now, the compiler can correctly compile a try statement and an
620      infinite while-loop.
621</ul>
622
623<p>- version 2.5.1 in May, 2003.
624<br>Simple changes for integration with JBoss AOP
625<ul>
626  <li>Made ClassPool.get0 protected so that subclasses of ClassPool can call it.
627  <li>Moved all access to the class cache (the field ClassPool.classes) to a method called getCached(String classname).  This is so subclasses of ClassPool can override this behavior.
628</ul>
629
630<p>- version 2.5 in May, 2003.
631<br>From this version, Javassist is part of the JBoss project.
632<ul>
633  <li>The license was changed from MPL to MPL/LGPL dual.
634  <li>ClassPool.removeClassPath() and ClassPath.close() have been added.
635  <li>ClassPool.makeClass(InputStream) has been added.
636  <li>CtClass.makeClassInitializer() has been added.
637  <li>javassist.expr.Expr has been changed to a public class.
638  <li>javassist.expr.Handler has been added.
639  <li>javassist.expr.MethodCall.isSuper() has been added.
640  <li>CtMethod.isEmpty() and CtConstructor.isEmpty() have been added.
641  <li>LoaderClassPath has been implemented.
642</ul>
643
644<p>- version 2.4 in February, 2003.
645<ul>
646  <li>The compiler included in Javassist did not correctly work with
647	interface methods.  This bug was fixed.
648  <li>Now javassist.bytecode.Bytecode allows more than 255 local
649	variables in the same method.
650  <li>javassist.expr.Instanceof and Cast have been added.
651  <li>javassist.expr.{MethodCall,NewExpr,FieldAccess,Instanceof,Cast}.where()
652        have been added.  They return the caller-side method surrounding the
653	expression.
654  <li>javassist.expr.{MethodCall,NewExpr,FieldAccess,Instanceof,Cast}.mayThrow()
655        have been added.
656  <li>$class has been introduced.
657  <li>The parameters to replaceFieldRead(), replaceFieldWrite(),
658      and redirectFieldAccess() in javassist.CodeConverter are changed.
659  <li>The compiler could not correctly handle a try-catch statement.
660      This bug has been fixed.
661</ul>
662
663<p>- version 2.3 in December, 2002.
664<ul>
665  <li>The tutorial has been revised a bit.
666  <li>SerialVersionUID class was donated by Bob Lee.  Thanks.
667  <li>CtMethod.setBody() and CtConstructor.setBody() have been added.
668  <li>javassist.reflect.ClassMetaobject.useContextClassLoader has been added.
669  If true, the reflection package does not use Class.forName() but uses
670  a context class loader specified by the user.
671  <li>$sig and $type are now available.
672  <li>Bugs in Bytecode.write() and read() have been fixed.
673</ul>
674
675<p>- version 2.2 in October, 2002.
676<ul>
677  <li>The tutorial has been revised.
678  <li>A new package <code>javassist.expr</code> has been added.
679        This is replacement of classic <code>CodeConverter</code>.
680  <li>javassist.ConstParameter was changed into
681	javassist.CtMethod.ConstParameter.
682  <li>javassist.FieldInitializer was renamed into
683	javassist.CtField.Initializer.
684  <li>A bug in javassist.bytecode.Bytecode.addInvokeinterface() has been
685	fixed.
686  <li>In javassist.bytecode.Bytecode, addGetfield(), addGetstatic(),
687	addInvokespecial(), addInvokestatic(), addInvokevirtual(),
688	and addInvokeinterface()
689	have been modified to update the current statck depth.
690</ul>
691
692<p>- version 2.1 in July, 2002.
693<ul>
694  <li>javassist.CtMember and javassist.CtBehavior have been added.
695  <li>javassist.CtClass.toBytecode() has been added.
696  <li>javassist.CtClass.toClass() and javassist.ClassPool.writeAsClass()
697	has been added.
698  <li>javassist.ByteArrayClassPath has been added.
699  <li>javassist.bytecode.Mnemonic has been added.
700  <li>Several bugs have been fixed.
701</ul>
702
703<p>- version 2.0 (major update) in November, 2001.
704<ul>
705  <li>The javassist.bytecode package has been provided.  It is a
706    lower-level API for directly modifying a class file although
707    the users must have detailed knowledge of the Java bytecode.
708
709  <li>The mechanism for creating CtClass objects have been changed.
710
711  <li>javassist.tool.Dump moves to the javassist package.
712</ul>
713
714<p>version 1.0 in July, 2001.
715<ul>
716  <li>javassist.reflect.Metaobject and ClassMetaobject was changed.
717    Now they throw the same exception that they receive from a
718    base-level object.
719</ul>
720
721<p>- version 0.8
722<ul>
723  <li>javassist.tool.Dump was added.  It is a class file viewer.
724
725  <li>javassist.FiledInitializer.byNewArray() was added.  It is for
726    initializing a field with an array object.
727
728  <li>javassist.CodeConverter.redirectMethodCall() was added.
729
730  <li>javassist.Run was added.
731</ul>
732
733<p>- version 0.7
734<ul>
735  <li>javassit.Loader was largely modified.  javassist.UserLoader was
736    deleted.  Instead, Codebase was renamed to ClassPath
737    and UserClassPath was added.  Now programmers who want to
738    customize Loader must write a class implementing UserClassPath
739    instead of UserLoader.  This change is for sharing class search paths
740    between Loader and CtClass.CtClass(String).
741
742  <li>CtClass.addField(), addMethod(), addConstructor(), addWrapper() were
743    also largely modified so that it receives CtNewMethod, CtNewConstructor,
744    or CtNewField.  The static methods for creating these objects were
745    added to the API.
746
747  <li>Constructors are now represented by CtConstructor objects.
748    CtConstructor is a subclass of CtMethod.
749
750  <li>CtClass.getUserAttribute() was removed.  Use CtClass.getAttribute().
751
752  <li>javassist.rmi.RmiLoader was added.
753
754  <li>javassist.reflect.Metalevel._setMetaobject() was added.  Now
755    metaobjects can be replaced at runtime.
756</ul>
757
758<p>- version 0.6
759<ul>
760  <li>Javassist was modified to correctly deal with array types appearing
761    in signatures.
762
763  <li>A bug crashed resulting bytecode if a class includes a private static
764    filed.  It has been fixed.
765
766  <li>javassist.CtNewInterface was added.
767
768  <li>javassist.Loader.recordClass() was renamed into makeClass().
769
770  <li>javassist.UserLoader.loadClass() was changed to take the second
771    parameter.
772</ul>
773
774<p>- version 0.5
775<ul>
776  <li>a bug-fix version.
777</ul>
778
779<p>- version 0.4
780<ul>
781  <li>Major update again.  Many classes and methods were changed.
782    Most of methods taking java.lang.Class have been changed to
783    take javassist.CtClass.
784</ul>
785
786<p>- version 0.3
787<ul>
788  <li>Major update.  Many classes and methods were changed.
789</ul>
790
791<p>- version 0.2
792<ul>
793  <li>Jar/zip files are supported.
794</ul>
795
796<p>-version 0.1 on April 16, 1999.
797<ul>
798  <li>The first release.
799</ul>
800
801<p><br>
802
803<a name="copyright">
804<h2>Copyright notices</h2>
805
806<p>Javassist, a Java-bytecode translator toolkit.
807<br>Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
808
809<p>The contents of this software, Javassist, are subject to
810the Mozilla Public License Version 1.1 (the "License");<br>
811you may not use this software except in compliance
812with the License. You may obtain a copy of the License at
813<br>http://www.mozilla.org/MPL/
814
815<p>Software distributed under the License is distributed on an "AS IS"
816basis, WITHOUT WARRANTY OF <br>ANY KIND, either express or implied.
817See the License for the specific language governing rights and
818<br>limitations under the License.
819
820<p>The Original Code is Javassist.
821
822<p>The Initial Developer of the Original Code is Shigeru Chiba.
823Portions created by the Initial Developer are<br>&nbsp;
824Copyright (C) 1999- Shigeru Chiba. All Rights Reserved.
825<p>Contributor(s): __Bill Burke, Jason T. Greene______________.
826
827<p>Alternatively, the contents of this software may be used under the
828terms of the GNU Lesser General Public License Version 2.1 or later
829(the "LGPL"), or the Apache License Version 2.0 (the "AL"),
830in which case the provisions of the LGPL or the AL are applicable
831instead of those above. If you wish to allow use of your version of
832this software only under the terms of either the LGPL or the AL, and not to allow others to
833use your version of this software under the terms of the MPL, indicate
834your decision by deleting the provisions above and replace them with
835the notice and other provisions required by the LGPL or the AL. If you do not
836delete the provisions above, a recipient may use your version of this
837software under the terms of any one of the MPL, the LGPL or the AL.
838
839<p>If you obtain this software as part of JBoss, the contents of this
840software may be used under only the terms of the LGPL.  To use them
841under the MPL, you must obtain a separate package including only
842Javassist but not the other part of JBoss.
843
844<p>All the contributors to the original source tree have agreed to
845the original license term described above.
846
847<p><br>
848
849<h2>Acknowledgments</h2>
850
851<p>The development of this software is sponsored in part by the PRESTO
852and CREST programs of <a href="http://www.jst.go.jp/">Japan
853Science and Technology Corporation</a>.
854
855<p>I'd like to thank Michiaki Tatsubori, Johan Cloetens,
856Philip Tomlinson, Alex Villazon, Pascal Rapicault, Dan HE, Eric Tanter,
857Michael Haupt, Toshiyuki Sasaki, Renaud Pawlak, Luc Bourlier,
858Eric Bui, Lewis Stiller, Susumu Yamazaki, Rodrigo Teruo Tomita,
859Marc Segura-Devillechaise, Jan Baudisch, Julien Blass, Yoshiki Sato,
860Fabian Crabus, Bo Norregaard Jorgensen, Bob Lee, Bill Burke,
861Remy Sanlaville, Muga Nishizawa, Alexey Loubyansky, Saori Oki,
862Andreas Salathe, Dante Torres estrada, S. Pam, Nuno Santos,
863Denis Taye, Colin Sampaleanu, Robert Bialek, Asato Shimotaki,
864Howard Lewis Ship, Richard Jones, Marjan Sterjev,
865Bruce McDonald, Mark Brennan, Vlad Skarzhevskyy,
866Brett Randall, Tsuyoshi Murakami, Nathan Meyers, Yoshiyuki Usui
867Yutaka Sunaga, Arjan van der Meer, Bruce Eckel, Guillaume Pothier,
868Kumar Matcha, Andreas Salathe, Renat Zubairov, Armin Haaf,
869Emmanuel Bernard, Jason T. Greene
870and all other contributors for their contributions.
871
872<p><br>
873
874<hr>
875<a href="http://www.javassist.org">Shigeru Chiba</a>
876(Email: <tt>chiba@javassist.org</tt>)
877
878</body>
879</html>
880