You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

README-121.html 6.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2 Final//EN">
  2. <html> <head>
  3. <title>AspectJ 1.2.1 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 2004 Contributors.
  17. All rights reserved.
  18. </small></div>
  19. <h1>AspectJ 1.2.1 Readme</h1>
  20. <p>AspectJ 1.2.1 is largely a bug-fix release and the definition of the
  21. AspectJ language is unchanged from the 1.2.0 release (with the exception
  22. that AspectJ 1.2.1 permits the use of the '+' operator to concatenate
  23. the messages for declare error and warning statements).
  24. This document describes the tools differences between AspectJ versions 1.2 and 1.2.1.
  25. Users familiar with AspectJ 1.2 may find this document
  26. a quicker way to learn what changed in the tools.
  27. </p>
  28. <p>This document summarizes changes in:
  29. <ul>
  30. <li>Weaver messages</li>
  31. <li>Dump support</li>
  32. <li>JDT Compiler version</li>
  33. <li>Line number information for join points</li>
  34. <li>Runtime performance</li>
  35. <li>String concatentation in declare error and warning statements</li>
  36. <li>Load-time weaving support</li>
  37. <li>Use of aspect libraries generated by ajc 1.2.1 with earlier versions of ajc</li>
  38. </ul>
  39. </p>
  40. <p>
  41. See the <a href="changes.html">changes document</a> for more details, or
  42. <a href="#allchanges">all the changes</a> as detailed in the bugzilla
  43. database.
  44. </p>
  45. <h2>Weaver Informational Messages</h2>
  46. <p>
  47. The AspectJ 1.2.1 compiler can produce informational messages about the
  48. weaving process. To see these messages, use the -showWeaveInfo compiler
  49. option, or set showweaveinfo=true in the iajc ant task.
  50. </p>
  51. <p>The following is an example of the messages produced when this option is enabled:</p>
  52. <pre>
  53. C:\aspectj1.2.1\doc\examples\tjp>ajc -showWeaveInfo *.java
  54. Type 'tjp.Demo' (Demo.java:20) advised by around advice from 'tjp.GetInfo'
  55. (GetInfo.java:26) [RuntimeTest=true]
  56. Type 'tjp.Demo' (Demo.java:30) advised by around advice from 'tjp.GetInfo'
  57. (GetInfo.java:26) [RuntimeTest=true]
  58. Type 'tjp.Demo' (Demo.java:34) advised by around advice from 'tjp.GetInfo'
  59. (GetInfo.java:26) [RuntimeTest=true]
  60. </pre>
  61. <h2>Dump Support</h2>
  62. <p>In the event of a compiler crash, AspectJ 1.2.1 will produce a dump file giving
  63. important information about the state of the compiler at the time of the crash.
  64. These dump files should enable us to analyze problems more effectively. In the
  65. rare event that you witness a compiler crash, please attach the dump file to
  66. the bug report.</p>
  67. <p>In addition to producing a dump file when an abort condition is detected, the
  68. AspectJ 1.2.1 compiler can also be requested to create a dump file on detection
  69. of a compilation error. Set the property org.aspectj.weaver.Dump.condition=error to
  70. enable this behaviour.</p>
  71. <h2>JDT Compiler Version</h2>
  72. <p>AspectJ 1.2.1 is based on the Eclipse 3.0 final JDT compiler.</p>
  73. <h2>Line Number Information for Join Points</h2>
  74. <p>For source files compiled by ajc (as opposed to binary inputs to the compiler
  75. compiled with some other java compiler), ajc now emits better line number information
  76. for execution join points. In particular, for a method, constructor or advice
  77. execution join point (as matched for example by a declare error or declare warning
  78. statement), ajc 1.2.1 reports the first line number of the declaration,
  79. as opposed to the line number of the first line of code in the body. </p>
  80. <h2>Runtime Performance</h2>
  81. <p>AspectJ 1.2.1 contains a small number of runtime performance optimisations, including
  82. optimisations of if(true) and if(false) pointcut expressions, caching of getSignature()
  83. and toString() results on JoinPoint objects, and an optimised implementation of cflow.</p>
  84. <p>In the case where there are no arguments bound in
  85. the cflow pointcut, programs compiled under AspectJ 1.2.1 and that make
  86. heavy use of cflow will run significantly faster. Thanks to the abc compiler team
  87. for detecting this performance related bug and for piloting the fix. </p>
  88. <h2>String Concatentation in Declare Error/Warning Statements</h2>
  89. <p>String concatentation in declare error and warning statements is now supported.
  90. For example, you can write:</p>
  91. <pre>
  92. declare warning : jdbcCall() &amp;&amp; !inDataLayer()
  93. : "Please don't make calls to JDBC " +
  94. "outside of the data layer.";
  95. </pre>
  96. <h2>Load-time Weaving Support</h2>
  97. <p>
  98. The AspectJ 1.2.1 distribution contains a new jar in the lib directory,
  99. aspectjweaver.jar, that contains the subset of aspectjtools.jar needed
  100. for weaving only. This jar may be used in situations where you wish to
  101. exploit AspectJ's binary weaving capabilities, but do not want the full
  102. aspectjtools.jar around (aspectjweaver.jar is approx. 5 times smaller).
  103. </p>
  104. <p>
  105. In addition, the load-time weaving "aj" script which was included in the
  106. doc/examples/ltw directory in the 1.2 distribution has been moved into
  107. the regular bin directory. See <a href="README-12.html">README-12</a> for
  108. details of using this script.
  109. </p>
  110. <h2>Binary Compatibility</h2>
  111. <p>AspectJ 1.2.1 introduces a backwards-incompatible change to the class
  112. file format generated by the AspectJ compiler. Classes generated by
  113. ajc v1.2.1 cannot be used on the inpath or aspectpath of a weaver from
  114. a prior version of the compiler. Classes generated by prior versions of
  115. the compiler can of course be placed on the inpath or aspectpath of the
  116. 1.2.1 weaver.</p>
  117. <p>
  118. As ever, you should use the AspectJ runtime library (aspectjrt.jar) that
  119. comes with the distribution you used to build your application.
  120. </p>
  121. <hr/>
  122. <a name="allchanges"></a>
  123. <h2>All changes are listed in the bug database</h2>
  124. For a complete list of changes in the 1.2.1 release, search for
  125. <code>target 1.2.1</code> in the bug database:
  126. <a href="https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&component=Compiler&target_milestone=1.2.1">
  127. https://bugs.eclipse.org/bugs/buglist.cgi?product=AspectJ&target_milestone=1.2.1&bug_status=RESOLVED&resolution=FIXED
  128. </a>
  129. </body> </html>