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