Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] Implementation of AspectJ 1.0.6 and 1.1

Stephen Cheng wrote:
> I am looking for papers, or design documents describing the way aspects
> are
> weaved into the base program. I am developing post-processor type
> programming tools that work with programs generated by AspectJ, therefore
> I
> require details information for:

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.  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.

> 1. When is reflection used during run-time?

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.

> 2. When are aspects completely weaved into class-files during compile-
> time,
> therefore have no additional run-time reflection requirements?

Unless you use the experimental -XnoWeave option in AspectJ-1.1, then aspects will always be completely woven into class-files at compile-time with no run-time reflection requirements.

> 3. What are the restrictions on class names and member names renaming?

I don't understand this question.  Could you ask it in a more concrete way?  When in the development/deployment process are you talking about doing this renaming?  Are you doing it by hand or with automated tools?  Have you addressed all of the pure-Java issues that can occur with doing this kind of renaming?

> As I understand AspectJ 1.0.x and the upcoming 1.1 employs different
> underlying weaving technology. Any pointers or help would be most
> appreciated.

The main difference is that AspectJ 1.0.x can only perform weaving at compile-time and can only weave into classes for which source code is available.  AspectJ-1.1 typically performs weaving at compile-time, but it can also be used to weave into .class files that only have bytecode available either as a link-time step or even at class load time.  If you're curious about load-time weaving, you should see the recent discussion started by Martin Lippert about this on the aspectj-dev list.

-Jim


Back to the top