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 AspectJ Project Development). 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.
There are currently no documents describing this process in detail. You can compile programs and inspect the generated source or bytecode, or view the source code (see AspectJ Project Development). We hope to write papers on the bytecode weaving model used in AspectJ-1.1 if we can find the time. Erik Hilsdale and Jim Hugunin did draft a paper for AOSD 2004, now available on Jim’s web site: http://hugunin.net/papers.html Jim summarized advice weaving in the AspectJ 1.1 implementation in the following mailing-list reply: Each piece of advice in an aspect is associated with a pointcut. This pointcut is stored in an attribute on the methods corresponding to each piece of advice. Before weaving, all of these pieces of advice are gathered into one large list. Each .class file is woven independently. A .class file is woven by the following steps: • Collect all of the joinpoint shadows in the .class file. For every dynamic joinpoint in the AspectJ language model, there is a corresponding stati