Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Proposal for extending AspectJ to support metadata...

It's great to see some design proposals for this important feature. I have a few comments:

- I like Ramnivas' draft for supporting pointcuts based on method annotations and annotation parameters. Hopefully most of the common cases can be handled purely statically, without runtime checks.

- I would like to see this kind of support extended to adviceexecution pointcuts too. I think it would also be useful to extend adviceexecution pcd's by allowing a meta-annotation for kind of advice: @Before, @AfterReturning, @AfterThrowing, @After, @Around

- I prefer Adrian's version of declare annotation using underlying patterns, rather than Ramnivas' proposed use of pointcuts. Using pointcuts for this purpose would have to break orthogonality since you can't declare annotations on pointcuts like handler and cflow (and I wouldn't like to see it allowed for call). It would also seem artificial to use a pointcut to declare annotations on a type (e.g., would you use staticinitialization??). 

- I note that Adrian's declare annotation proposal doesn't allow declaring annotations on packages. This is probably fine, although it would seem conceptually cleaner to allow it. It would be tricky to use patterns to do this, e.g., having declare annotation: org.xyz.model..*: @Foo declare annotations on the subpackages as well as their member types would be undesirable.

- I think it is strongly desirable to allow annotations on advice (e.g., for allowing tools to show names, to provide for testing, for defining properties that are relevant for matching adviceexecution without explicit enumeration). There was a good aspectj-dev thread on point in August of 2003 with the subject "Named advice," all four of my arguments in favor of named advice (encouraging describing behavior, for matching in adviceexecution, for debugging and stack trace names, and separate the concept of pointcut and advice) are good reasons to at least allow annotations on advice.

- The presence of source-file retention annotations provides another incentive for a mode of weaving that uses source files instead of bytecode. It would even be possible to have useful join points based on accessing local variables using such annotations.

Ron Bodkin
Chief Technology Officer
New Aspects of Software
o: (415) 824-4690
m: (415) 509-2895


> ------------Original Message------------
> From: Adrian Colyer <adrian_colyer@xxxxxxxxxx>
> To: aspectj-dev@xxxxxxxxxxx
> Date: Mon, Nov-8-2004 11:56 AM
> Subject: Re: [aspectj-dev] Proposal for extending AspectJ to support metadata...
>
> Great blog entry, thanks :)
> 
> I've been working on a similar document as part our AspectJ 1.5 work. 
> The 
> original is in docbook format like the other AspectJ guides, so for 
> expediency I'm attaching a zip of the current state of the annotation 
> specification as HTML files. There are a lot of similarities to the 
> suggestions you make, which is a good thing as it means the syntax must 
> be 
> relatively intuitive. Please note that this is a very early draft (it 
> hasn't even been through an initial review - we have that scheduled for 
> 
> tomorrow afternoon) so may still contain some basic errors and is 
> certainly subject to change. However, now seemed like the appropriate 
> time 
> to get it out under the spotlight to join the discussion. When we hold 
> that review tomorrow, we'll include your proposals too to make sure 
> that 
> we are getting the best of both....
> 
> Cheers, Adrian.
> 
> 
> 
> -- Adrian
> Adrian_Colyer@xxxxxxxxxx
> 
> 
> 
> Ramnivas Laddad <ramnivas@xxxxxxxxxxxxxxx> 
> Sent by: aspectj-dev-admin@xxxxxxxxxxx
> 08/11/2004 19:00
> Please respond to
> aspectj-dev@xxxxxxxxxxx
> 
> 
> To
> aspectj-dev@xxxxxxxxxxx
> cc
> 
> Subject
> [aspectj-dev] Proposal for extending AspectJ to support metadata...
> 
> 
> 
> 
> 
> 
> Hello,
> 
> I have posted a proposal to extend AspectJ to support JSR-175 
> annotations. It started as an email, but soon got too long, so I 
> retargeted as a blog entry:
> 
> http://ramnivas.com/blog/index.php?p=10
> 
> Comments appreciated.
> 
> -Ramnivas
> 
> -- 
> ===
> Ramnivas Laddad,
> Author, AspectJ in Action
> http://ramnivas.com/blog
> 
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-dev
> 
> 



Back to the top