Nelze vybrat více než 25 témat Téma musí začínat písmenem nebo číslem, může obsahovat pomlčky („-“) a může být dlouhé až 35 znaků.

README-12.html 25KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  2. <html> <head>
  3. <title>AspectJ 1.2 Readme</title>
  4. <style type="text/css">
  5. <!--
  6. P { margin-left: 20px; }
  7. PRE { margin-left: 20px; }
  8. LI { margin-left: 20px; }
  9. H4 { margin-left: 20px; }
  10. H3 { margin-left: 10px; }
  11. -->
  12. </style>
  13. </head>
  14. <body>
  15. <div align="right"><small>
  16. &copy; Copyright 2003,2004 Contributors.
  17. All rights reserved.
  18. </small></div>
  19. <h1>AspectJ 1.2 Readme</h1>
  20. <p> The definition of the AspectJ language is unchanged in the 1.2 release.
  21. Instead, AspectJ 1.2 provides major improvements to the functionality of the
  22. supporting tools
  23. and enforces some language limits that went unchecked before.
  24. This document describes the tools differences between
  25. AspectJ versions 1.2 and 1.1.1.
  26. Users new to AspectJ need only read
  27. the <a href="progguide/index.html">AspectJ Programming Guide</a>
  28. since it describes the 1.2 language.
  29. Users familiar with AspectJ 1.1 may find this document
  30. a quicker way to learn what changed in the tools,
  31. and should use it as a guide for porting
  32. programs from 1.1 to 1.2,
  33. together with <a href="porting.html">porting.html</a>.
  34. </p>
  35. <p>This document first summarizes changes from the 1.1.1 release in
  36. </p>
  37. <ul>
  38. <li><a href="#compiler">the compiler</a>,</li>
  39. <li><a href="#tools">the support tools</a>,</li>
  40. <li><a href="#runtime">the runtime</a>,</li>
  41. <li><a href="#devenv">the development environment support</a>,</li>
  42. </ul>
  43. <p> then <a href="#details">details</a> some of the changes,
  44. and finally points readers to the bug database for
  45. <a href="#allchanges">all the changes</a>.
  46. </p>
  47. <!-- ============================== -->
  48. <!-- ============================== -->
  49. <hr>
  50. <h2><a name="compiler">The Compiler</a></h2>
  51. Compared to AspectJ 1.1.1, the AspectJ 1.2 compiler...
  52. <ul>
  53. <li><a href="#WEAVE_TIME">Is faster</a>, with weaving completing in less than half the time it
  54. used to take in many cases.
  55. <a name="WEAVE_CHART"><img src="images/AspectJ11v12.JPG"></img></a>.</li>
  56. <li>Supports the <a href="#LAZY_TJP">-XlazyTjp option</a> which produces code that runs
  57. faster and uses less memory in some common cases.</li>
  58. <li>Has <a href="#INCREMENTAL">much better support for incremental compilation</a>.</li>
  59. <li>Produces <a href="#ERROR_MESSAGES">better error messages</a>.</li>
  60. <li>Has some <a href="#LINT">new lint warnings</a> to catch common mistakes and changes to serializability.</li>
  61. <li>Supports the <a href="#REWEAVABLE">-Xreweavable option</a> that allows classes to be woven more
  62. than once.<li>
  63. <li>Supports the <a href="#INPATH">-inpath option</a> which allows both directories and jars
  64. containing class files to be specified as input to the weaver.</li>
  65. <li><a href="#COMPLIANCE">Changes the default compiler compliance mode</a> from -1.3 to -1.4.
  66. </ul>
  67. <p> A short description of the options ajc accepts is available with
  68. "<code>ajc -help</code>".
  69. Longer descriptions are available in the
  70. <a href="devguide/ajc-ref.html">Development Environment Guide
  71. section on ajc</a>. </p>
  72. <p> </p>
  73. <!-- ============================== -->
  74. <hr>
  75. <h2><a name="tools">Support Tools</a></h2>
  76. <p>AspectJ 1.2 contains two important changes to the supporting tools:</p>
  77. <ul>
  78. <li><a href="#AJDOC">ajdoc</a> is back<li>A sample script is supplied for <a href="#LTW">load-time weaving</a> from the command-line.
  79. </ul>
  80. <!-- ============================== -->
  81. <hr>
  82. <h2><a name="runtime">The Runtime Library</a></h2>
  83. <p>This release has minor updates to the runtime library classes.
  84. As with any release, you should compile and run with the runtime
  85. library that came with your compiler, and you may run with
  86. a later version of the library without recompiling your code.</p>
  87. <ul>
  88. <li><a href="#SOFTEX"><code>SoftException</code></a> now supports <code>getCause()</code>.</li>
  89. <li>Although not part of <code>aspectjrt.jar</code> this release also provides a new set of
  90. tools APIs in the <a href="#LTW2"><code>org.aspectj.weaver.tools</code></a> that provide a weaving class loader
  91. and an adapter that can be used to integrate load-time weaving into an existing class loader
  92. hierarchy.</li>
  93. <li>Cflow stack management has been modified to use thread local storage on JVMs that support this feature.
  94. This improves performance in terms of heap usage for multi-threaded applications that use cflow.
  95. </ul>
  96. <!-- ============================== -->
  97. <hr>
  98. <h2><a name="devenv">The AJDE Tools</a></h2>
  99. <p> The AJDE based tools for JBuilder, NetBeans and Emacs continue to be independent
  100. SourceForge projects. The AspectJ 1.2 distribution includes an updated version of the
  101. AjBrowser tool that benefits from all the enhancements made in the 1.2 compiler.</p>
  102. <p>The 1.2 release of AspectJ also lays a lot of the groundwork for a much better AspectJ
  103. IDE experience that we hope to surface initially through AJDT (AspectJ support
  104. for Eclipse). Amongst the many improvements, we
  105. will have full eager parsing support that avoids the need to keep the whole structure
  106. model of a project in memory, hopefully making AJDT much less memory hungry and much
  107. slicker to use. For more details see the <a href="http://www.eclipse.org/ajdt">
  108. AJDT project website</a>.
  109. <!-- ============================== -->
  110. <hr>
  111. <h2><a name="details">Details</a> of some compiler changes</h2>
  112. <h3><a name="WEAVE_TIME">Compilation (weave) times reduced.</a></h3>
  113. <p>Our benchmark suite shows that AspectJ 1.2 is at least twice as fast in the
  114. weaving phase as AspectJ 1.1.1 for matches based on a variety of pointcut expressions
  115. (see the <a href="#WEAVE_CHART">chart above</a>). We've also made the base
  116. incremental compilation implementation in AspectJ 1.2 approximately twice as fast
  117. as in AspectJ 1.1.1, so when this is combined with the weave time improvements you
  118. should see speed-ups of up to 4x for incremental compilation.</p>
  119. <p>In addition, AspectJ 1.2 maintains only weak references to some of its recoverable data structures,
  120. allowing the JVM to optimise between performance and memory usage. Experiments forcing GC
  121. showed that we can achieve about a 20% memory usage reduction in this manner if needed.</p>
  122. <h3><a name="LAZY_TJP">The -XlazyTjp option.</a></h3>
  123. <p>Under AspectJ 1.1.1, if the body of an advice contained a reference to a
  124. non-statically determinable portion of <code>thisJoinPoint</code> (such as for example a call
  125. to <code>getArgs()</code>), then a JoinPoint object was always creating before entering the advice.
  126. This was the case even if the advice was guarded with an <code>if()</code> pointcut that
  127. evaluated to false. </p>
  128. <p>AspectJ 1.2 now supports the <code>-XlazyTjp</code> option that only creates the JoinPoint object just
  129. before dispatching to the advice body. By promoting the guard to a test in an <code>if()</code> pointcut,
  130. the creation of the JoinPoint object can be avoided altogether in the case where the test returns false.</p>
  131. <p>Consider a simple tracing aspect as follows:</p>
  132. <pre>
  133. public aspect Tracing {
  134. public static boolean enabled = false;
  135. pointcut toBeTraced() : execution(* *(..)) || execution(new(..));
  136. before() : toBeTraced() && if(enabled) {
  137. Object[] args = thisJoinPoint.getArgs();
  138. // format args and print out entry trace record etc....
  139. }
  140. }
  141. </pre>
  142. <p> The most important consideration is the system overhead when tracing is turned off. Using the
  143. <code>-XlazyTjp</code> option makes the program above run 10-100x faster, even when running a
  144. small test case with minimal GC issues. The optimization is disabled at join points advised by
  145. around advice, and an Xlint warning will be displayed in these cases.
  146. </p>
  147. <h3><a name="INCREMENTAL">Improvements to incremental compilation.</a></h3>
  148. <p>AspectJ 1.2 provides more complete incremental compilation support than AspectJ 1.1.1.
  149. Firstly, incremental compilation resulting from a change to a source file is now approximately
  150. twice as fast as it was under 1.1.1 (even before taking the improvements to weaving time into
  151. account). Secondly, the incremental coverage now takes into account changes to resources, classes and jars
  152. on the inpath, injars, and aspectpath. The new <code>inpath</code> option in AspectJ 1.2 allows
  153. directories to be specified in addition to jars (just like a classpath) as input to the weaver. Any update, addition
  154. or deletion of a class file in a directory on the inpath will cause incremental (re)weaving.
  155. <p>Changes to a jar file on the inpath, injars or aspectpath will now be detected, but will trigger a
  156. full rebuild, as will any change to the paths used to control compilation.</p>
  157. <h3><a name="ERROR_MESSAGES">Improved error messages.</a></h3>
  158. <p>AspectJ 1.1.1 did not provide source context information for messages produced during the weaving phase,
  159. even in the case where source files were passed to the compiler. For example, an error message arising as
  160. a result of a <code>declare error</code> statement might look as follows under AspectJ 1.1.1: </p>
  161. <font color="red">
  162. <pre>
  163. BadClass.java:6 should not be calling bad methods
  164. </pre>
  165. </font>
  166. <p>whereas in AspectJ 1.2 you will see:</p>
  167. <font color="red">
  168. <pre>
  169. BadClass.java:6 error should not be calling bad methods
  170. new C().bad();
  171. ^^^^^^^^^^^^^^
  172. method-call(void C.bad())
  173. see also: DeclareError.java:5
  174. </pre>
  175. </font>
  176. <p>There are four new things to note about this error message. Firstly, errors and
  177. warnings are now prefixed with the word "error", or "warning" as appropriate.
  178. Secondly, the offending line of source is shown if source code is available. Thirdly,
  179. in the case of weaver messages arising as a result of <code>declare error</code> and
  180. <code>declare warning</code> statements, AspectJ now shows not only the location of the
  181. error or warning, but also the location of the <code>declare</code> statement itself.
  182. Finally, note that messages produced as a result of <code>declare error</code> and
  183. <code>declare warning</code> statements now also display the matched join point at the
  184. location of the error:</p>
  185. <p>When source code is not available, the messages show the binary input source (class
  186. file or jar file) in which the error or warning was detected: </p>
  187. <font color="red">
  188. <pre>
  189. BadClass.java:6 error should not be calling bad methods
  190. (no source information available)
  191. method-call(void C.bad())
  192. see also: C:\...\DeclareError.java:5
  193. see also: C:\...\bin-input.jar
  194. </pre>
  195. </font>
  196. <p>This error message tells us that <code>BadClass.class</code> contained in a jar on the inpath called <code>bin-input.jar</code>,
  197. and originally compiled from a source file called <code>BadClass.java</code>, contains a join point
  198. (<code>method-call(void C.bad())</code> matched by a <code>declare error</code> statement on line 5 of the file
  199. <code>DeclareError.java</code>.
  200. <h3><a name="LINT">New lint warnings.</a></h3>
  201. <p>Consider the program:</p>
  202. <pre>
  203. <code>
  204. 01 class A {
  205. 02 public void doIt() {...};
  206. 03 }
  207. 04
  208. 05 class B extends A {
  209. 06 public void doThisToo() {...};
  210. 07 }
  211. 08
  212. 09
  213. 10 public class CallsAandB {
  214. 11
  215. 12 public static void main(String[] args) {
  216. 13 B b = new B();
  217. 14 A bInDisguise = new B();
  218. 15
  219. 16 b.doIt(); // AspectJ 1.2 matches here
  220. 17 bInDisguise.doIt(); // this is never matched
  221. 18 }
  222. 19
  223. 20 }
  224. 21
  225. 22 aspect CallPCDMatchingExample {
  226. 23
  227. 24 before() : call(* B.doIt(..)) {
  228. 25 System.out.println("About to call B.doIt(...)");
  229. 26 }
  230. 27
  231. 28 }
  232. </code>
  233. </pre>
  234. <p>Because the static type of <code>bInDisguise</code> is <code>A</code> (line 14), the call on line
  235. 17 is never matched by the pointcut expression on 24, even though the runtime type of
  236. <code>bInDisguise</code> is <code>B</code>. Type patterns matched in <code>call</code> pointcut
  237. designators are matched based on static type matching. Some users have found
  238. this static type matching confusing, and AspectJ 1.2 has a new Xlint warning
  239. (<code><b>unmatchedSuperTypeInCall</b></code>) which is enabled by default.</p>
  240. <p>The compiler will now produce a warning whenever a call pointcut designator does not match at a
  241. join point, and a user may have expected it to. Compiling the above program using AspectJ 1.2
  242. produces the following compiler output:</p>
  243. <pre>
  244. <code>
  245. <font color="red">
  246. CallsAandB.java:24 warning does not match because declaring type is A, if match desired use target(B) [Xlint:unmatchedSuperTypeInCall]
  247. before() : call(* B.doIt(..)) {
  248. ^^^^^^^^^^^^^^^
  249. see also: CallsAandB.java:17
  250. </font>
  251. <font color="blue">
  252. 1 warning
  253. </font>
  254. </code>
  255. </pre>
  256. <p> The warning is telling us that the call pointcut associated with the before advice on line 24
  257. of the source file does not match at a join point where the user may have expected it to. The source
  258. location corresponding to the unmatched join point is indicated by the "see also" line - in this case
  259. line 17 of the source file. At line 17 we find a call to <code>bInDisguise.doIt()</code>. Since the
  260. static type of <code>bInDisguise</code> is <code>A</code>, this call will never be matched.
  261. The warning also tells us a possible solution if we intended the pointcut to match at this join point: use
  262. <code>call(* doIt(..) && target(B)</code>.</p>
  263. <p>If you find warnings of this kind coming out when you use the AspectJ 1.2 compiler, the recommended fix is to
  264. switch to using the <code>target</code> designator in place of a type pattern in the <code>call</code> pointcut
  265. expression. Note that there is no loss of runtime efficiency here - runtime tests are only added in the cases
  266. where it cannot be determined at compile time whether the type of the receiver will match the type specified in
  267. the <code>target</code> expression. Also note that <code>target</code> cannot be used in <code>declare</code> statements.
  268. </p>
  269. <p>A new Xlint warning, <code><b>needsSerialVersionUIDField</b></code> (disabled by default) will produce a
  270. warning at compile time if the process of weaving changes the default <code>serialVersionUID</code> of
  271. a serializable class, and the class does not define a <code>serialVersionUID</code>. By defining a
  272. <code>serialVersionUID</code> field, the programmer can ensure that objects serialized without the aspect
  273. present can be read by a version of the program in which the aspect is present, and vice-versa.</p>
  274. <p>A complimentary Xlint warning, <code><b>brokeSerialVersionCompatibility</b></code> (disabled by default) will
  275. produce a warning at compile time if the process of weaving makes an incompatible change to a serializable
  276. class (for example, through the addition of an inter-type declared field).
  277. <h3><a name="REWEAVABLE">The -Xreweavable option.</a></h3>
  278. <p>The new <code>-Xreweavable</code> option produces class files that contain enough additional information in
  279. them that they can be rewoven. In time we hope that this can become a standard option, replacing the current
  280. <code>-Xnoweave</code> option. Using reweavable produces class files that can be legally loaded by a JVM, whereas
  281. with noweave, it is too easy to produce class files that will result in a verify error at runtime. The reweavable
  282. option makes it easy to weave code many times without having to decide which weave is the final one. In a future version
  283. of the AspectJ compiler, producing reweavable class files may become the default option. The trade-off at the moment is that
  284. reweavable class files are currently approximately twice the size of their non-reweavable counterparts.
  285. <p>To ensure consistent semantics when reweaving, the AspectJ compiler requires that all aspects that have previously
  286. modified a class file during weaving be present in the system during a reweave. An error will be issued if any are
  287. missing.
  288. <h3><a name="INPATH">The -inpath option.</a></h3>
  289. <p>The new <code>-inpath</code> option replaces the <code>-injars</code> option (which is still supported
  290. for backwards compatibility). It allows both directories and jar files to be specified using path separators
  291. to separate entries in the path. This option makes it easy for class files produced as the result of building
  292. one project to become binary input to the compilation of a second project.
  293. <h3><a name="COMPLIANCE">The default compliance mode of the compiler has changed from -1.3 to -1.4.</a></h3>
  294. <p>The default AspectJ compiler compliance level is now 1.4 (whereas in
  295. previous releases the default compliance level was 1.3). This has a number
  296. of implications:
  297. <ul>
  298. <li> class files generated by the compiler are now JRE v1.2 and upwards
  299. compatible. (At compliance level 1.3, AspectJ generated class files that
  300. were compatible with JRE 1.1 also).
  301. <li> <code>call</code> pointcuts may match more join points than in the same
  302. program compiled at compliance level 1.3.
  303. </ul>
  304. <p>The AspectJ compiler can be restored to 1.3 compliance settings by specifying the
  305. "-1.3" option on the command-line.
  306. </p>
  307. <p>Consider again the following example program which illustrates the differences in join point matching
  308. with the <code>call</code> pointcut designator between 1.4 and 1.3 compliance levels.
  309. <pre>
  310. <code>
  311. 01 class A {
  312. 02 public void doIt() {...};
  313. 03 }
  314. 04
  315. 05 class B extends A {
  316. 06 public void doThisToo() {...};
  317. 07 }
  318. 08
  319. 09
  320. 10 public class CallsAandB {
  321. 11
  322. 12 public static void main(String[] args) {
  323. 13 B b = new B();
  324. 14 A bInDisguise = new B();
  325. 15
  326. 16 b.doIt(); // AspectJ 1.2 matches here
  327. 17 bInDisguise.doIt(); // this is never matched
  328. 18 }
  329. 19
  330. 20 }
  331. 21
  332. 22 aspect CallPCDMatchingExample {
  333. 23
  334. 24 before() : call(* B.doIt(..)) {
  335. 25 System.out.println("About to call B.doIt(...)");
  336. 26 }
  337. 27
  338. 28 }
  339. </code>
  340. </pre>
  341. <p>When this program is compiled with AspectJ 1.2 using the default compiler options,
  342. it will produce one line of output when it is executed:</p>
  343. <p><code>About to call B.doIt(...)</code></p>
  344. <p>The same program compiled under AspectJ 1.1 (or using AspectJ 1.2 with the -1.3 flag specified)
  345. does not produce any output when it is run. The reason for the additional call pcd match is that
  346. prior to compliance level 1.4, Java compilers produced bytecodes that call A.doIt() (the defining type of the method),
  347. rather than B.doIt() (the declared type in the program text). The generated call to
  348. A.doIt() is not matched by the call pcd used in the before advice. At
  349. compliance level 1.4, the bytecodes retain the declared type of the receiver in the
  350. program source, generating a call to B.doIt(), which <i>is</i> matched by the call pcd.
  351. <p>This is a good example of why the recommended style is to use <code>call(* doIt(..)) && target(B)</code>,
  352. which always matches based on the actual type of the receiver.
  353. <!-- ============================== -->
  354. <hr>
  355. <h3><a name="AJDOC">The ajdoc tool makes a comeback in the AspectJ 1.2 distribution.</a></h3>
  356. <p><code>ajdoc</code> (the AspectJ replacement for the <code>javadoc</code> tool) is once again included in
  357. the AspectJ distribution. The <code>ajdoc</code> tool produces regular javadoc that also shows advises and
  358. advised by relationships next to methods and advice. A future enhancement will show inter-type declarations
  359. in the target class too. </p>
  360. <p><b>Known limitations: </b>Please note that <code>ajdoc</code> documents
  361. advice and pointcut members, shows where advice applies and links affected
  362. members back to the advice.&nbsp; It currently does not document or add
  363. structural links for any inter-type declarations or other declare forms.</p>
  364. <p>Run the &quot;ajdoc.bat&quot; script just
  365. as you run javadoc.&nbsp; For a list of accepted parameters run &quot;ajdoc
  366. -help&quot;.&nbsp; For example, to document everything in the Spacewar example
  367. run:<br>
  368. <tt>&gt; cd examples<br>
  369. &gt; ajdoc -d doc -private spacewar coordination</tt></p>
  370. <p><code>ajdoc</code> sample output for an aspect source file:</p>
  371. <p><img src="images/ajdoc1.JPG"/></p>
  372. <p><code>ajdoc</code> sample output for advised methods:</p>
  373. <p><img src="images/ajdoc2.JPG"/></p>
  374. <h3><a name="LTW">A sample script is supplied that supports load-time weaving from the command-line</a></h3>
  375. <p>The AspectJ 1.2 distribution ships with sample scripts for Windows and Unix platforms that exploit AspectJ's
  376. binary weaving capabilities at application load time. You will find these scripts in the
  377. <code>doc/examples/ltw</code> directory of your AspectJ installation. </p>
  378. <p>The scripts allow you to set an environment variable, <code>ASPECTPATH</code>, containing a path-separator
  379. delimited list of aspect-library jar files. A Java application can then be launched using the "<code>aj</code>"
  380. script ("<code>aj</code>" is to "<code>ajc</code>" as "<code>java</code>" is to "<code>javac</code>"). If the
  381. <code>ASPECTPATH</code> is unset or empty, "<code>aj</code>" behaves exactly the same as "<code>java</code>",
  382. but if the <code>ASPECTPATH</code> contains one or more aspect libraries, the aspects in the library will be
  383. linked (woven) with the application code as it is loaded.<p>
  384. <p>The <code>doc/examples/ltw</code> directory of your AspectJ installation contains a sample application that
  385. demonstrates these capabilities. Following the instructions in the <code>README</code> file in that directory,
  386. running "<code>aj tracing.ExampleMain</code>" with <code>ASPECTPATH</code> unset produces the output:</p>
  387. <font color="blue">
  388. <pre>
  389. c1.perimeter() = 12.566370614359172
  390. c1.area() = 12.566370614359172
  391. s1.perimeter() = 4.0
  392. s1.area() = 1.0
  393. c2.distance(c1) = 4.242640687119285
  394. s1.distance(c1) = 2.23606797749979
  395. s1.toString(): Square side = 1.0 @ (1.0, 2.0)
  396. </pre>
  397. </font>
  398. <p>If you set <code>ASPECTPATH</code> to include <code>../jars/tracingLib.jar</code>, and run
  399. "<code>aj tracing.ExampleMain</code>" again, the output will be:</p>
  400. <font color="blue">
  401. <pre>
  402. --> tracing.TwoDShape(double, double)
  403. <-- tracing.TwoDShape(double, double)
  404. --> tracing.Circle(double, double, double)
  405. <-- tracing.Circle(double, double, double)
  406. --> tracing.TwoDShape(double, double)
  407. <-- tracing.TwoDShape(double, double)
  408. --> tracing.Circle(double, double, double)
  409. <-- tracing.Circle(double, double, double)
  410. --> tracing.Circle(double)
  411. <-- tracing.Circle(double)
  412. --> tracing.TwoDShape(double, double)
  413. <-- tracing.TwoDShape(double, double)
  414. --> tracing.Square(double, double, double)
  415. <-- tracing.Square(double, double, double)
  416. --> tracing.Square(double, double)
  417. <-- tracing.Square(double, double)
  418. --> double tracing.Circle.perimeter()
  419. <-- double tracing.Circle.perimeter()
  420. c1.perimeter() = 12.566370614359172
  421. --> double tracing.Circle.area()
  422. <-- double tracing.Circle.area()
  423. c1.area() = 12.566370614359172
  424. --> double tracing.Square.perimeter()
  425. <-- double tracing.Square.perimeter()
  426. s1.perimeter() = 4.0
  427. --> double tracing.Square.area()
  428. <-- double tracing.Square.area()
  429. s1.area() = 1.0
  430. --> double tracing.TwoDShape.distance(TwoDShape)
  431. --> double tracing.TwoDShape.getX()
  432. <-- double tracing.TwoDShape.getX()
  433. --> double tracing.TwoDShape.getY()
  434. <-- double tracing.TwoDShape.getY()
  435. <-- double tracing.TwoDShape.distance(TwoDShape)
  436. etc...
  437. </pre>
  438. </font>
  439. <p>The scripts only support JDK 1.4 and above - attempting to use them with a 1.3 or lower JDK will most
  440. likely produce <code>NoClassDefFound</code> errors. We welcome contributions from users to improve these
  441. scripts.</p>
  442. <!-- ============================== -->
  443. <hr/>
  444. <h3><a name="SOFTEX">SoftException now supports getCause()</a></h3>
  445. <p><code>org.aspectj.lang.SoftException</code> now supports the <code>getCause()</code> method, which returns the
  446. original exception wrapped by the <code>SoftException</code>. This means that exception chains will print correctly
  447. on 1.4 and later JREs.
  448. <h3><a name="LTW2">org.aspectj.weaver.tools package added</a></h3>
  449. <p>A new set of public APIs are exported by the
  450. <a href="api/index.html"><code>org.aspectj.weaver.tools</code></a> package that can be used
  451. to integrate load-time weaving into an existing class loader hierachy. The package implementation
  452. is included in <code>aspectjtools.jar</code>. For an example of how to use these APIs, see the
  453. <code>org.aspectj.weaver.WeavingURLClassLoader</code> implementation.
  454. <hr/>
  455. <a name="allchanges"></a>
  456. <h2>All changes are listed in the bug database</h2>
  457. For a complete list of changes in the 1.2 release, search for
  458. <code>target 1.2</code> in the bug database:
  459. <a href="https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler&target_milestone=1.2">
  460. https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler&target_milestone=1.2
  461. </a>
  462. </body> </html>