From 1cc799ef3bebb0240f9de4e85d5c1802c9d997b3 Mon Sep 17 00:00:00 2001 From: wisberg Date: Mon, 3 Mar 2003 22:53:08 +0000 Subject: new "Technology" sections with answers about runtime reflection, load-time weaving, etc., some take from recent emails. --- docs/faq/faq.xml | 137 ++++++++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 125 insertions(+), 12 deletions(-) (limited to 'docs') diff --git a/docs/faq/faq.xml b/docs/faq/faq.xml index da9a3e117..edb034be0 100644 --- a/docs/faq/faq.xml +++ b/docs/faq/faq.xml @@ -23,7 +23,7 @@ 2003 Contributors. All rights reserved. - Last updated February 26, 2003. + Last updated March 3, 2003. @@ -51,15 +51,19 @@ of modularity is the class. In AspectJ, aspects modularize concerns that affect more than one class. - AspectJ includes a compiler (ajc), a - debugger (ajdb), a documentation generator - (ajdoc), a program structure browser - (ajbrowser), and integration - with Eclipse, Sun-ONE/Netbeans, GNU Emacs/XEmacs, JBuilder, and Ant. - - You compile your program using the AspectJ compiler (perhaps using - the supported development environments) and then run it, supplying - a small (< 100K) runtime library. + You compile your program using the AspectJ compiler + (perhaps using the supported development environments) + and then run it, + supplying a small (< 100K) runtime library. + + The AspectJ technologies include + a compiler (ajc), + a debugger (ajdb), + a documentation generator (ajdoc), + a program structure browser (ajbrowser), + and integration with + Eclipse, Sun-ONE/Netbeans, GNU Emacs/XEmacs, + JBuilder, and Ant. @@ -3170,6 +3174,113 @@ vmparam -Xmx384m + + Understanding AspectJ Technology + + + Do I need to know how the compiler or weaver works? + + + + Writing AspectJ programs only requires understanding the + Programming Guide. + However, current implementations do not control everything in + a system, so AspectJ program semantics may be limited to code + the implementation controls. For our implementation, these + limitations are stated in + + Programming Guide Appendix C. + Aside from understanding the use and limitations of the + implementation, there is no need to understand the underlying + technology when writing AspectJ programs. + + + The technology that implements AspectJ interests + some academic researchers and some developers + who want new features or new ways to weave. + These extensions are not discussed in the documentation. + Some are being developed already, + others are on the drawing board (or perhaps were left off + long ago), and still others haven't been considered. + If you are interested in a certain extension, + check the bug database for feature requests + and the mailing list archives for any past discussions. + Then email the list to see if it's been considered. + For more information, see + . + + + + + + How does the compiler/weaver work? Are there any white papers? + + + + + There are currently no documents describing this process in any detail. + Currently, the best way to understand this is to compile programs and + then inspect the generated source or bytecode. Many people have found + this very effective for understanding the weaving model. You also have + access to the source code for a different perspective. (See + ). + We hope to write + a couple of papers on the bytecode weaving model used in AspectJ-1.1 if + we can ever find the free time. + + + + + + Does AspectJ use reflection at runtime? + + + + + The only time that reflection is used during run-time is when the special + thisJoinPoint object is used to discover reflective information about the + join point. If you don't use thisJoinPoint then no reflection will be used. + + + + + + What about load-time weaving? Can I weave aspects at runtime? + + + + Not now, but it should be possible soon. + AspectJ 1.1 can weave binary aspects + into classes in bytecode form. Hooked up to a class loader, + this can weave class bytecodes after they are read in, + before the + class is defined by the VM. In the final 1.1 release, + we hope to document a small class loader as a proof-of-concept, + but we expect most people will already have a custom + class loader which they will adapt to invoke our weaver. + + Some have asked about only weaving classes specified + at run-time. + Aspects should work across an entire namespace, and problems + will likely result from weaving + some classes but not others. Also, it's confusing to + specify crosscutting both in the aspect and in the + list of runtime classes; the crosscutting specification + should be in the aspect itself, + where it can be processed by tools. + + And just to state the obvious: + do not use bytecode weaving, at load-time or otherwise, + to modify .class files protected by license, + without permission from the licensor. + + + + AspectJ Project Development @@ -3365,8 +3476,6 @@ vmparam -Xmx384m - - @@ -3781,6 +3890,10 @@ vmparam -Xmx384m Entries changes to reflect the move are not listed here. Other entries changed since the earlier November 26 version: + + + + -- cgit v1.2.3