Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-dev] AspectJ Custom Attributes

I think the issue is that tools like ASM are increasingly expecting only
Java 5 annotations for anything beyond standard Java attributes. That's not
a good design for a java platform tool in my books, but some of them are
taking the view that annotations are the right way to add any extra
information. Specifically, ASM barfs with an error on AspectJ attributes and
won't preserve them. This means that for tools like jarjar to handle AspectJ
class files, it requires a special patch. However, addressing that is
definitely not worth delaying the release of 5.0 in my books, and hopefully
ASM will support the non-annotation based AspectJ attributes once the 5.0
bytecode format is finalized.
 
This also reminds me of the question of using Java's synthetic for generated
methods versus AjSynthetic. I know that EMMA won't give line-level coverage
of AspectJ bytecode because it doesn't understand AjSynthetic and is
expecting those methods to be annotated as synthetic. I know that some other
tools were choking on bytecode that was marked as synthetic when AspectJ did
this. I wonder if -XrealSynthetic is a worthwhile option. Conversely, are
those other tools just broken? Should there be a -XprivateSynthetic be an
option instead?

-----Original Message-----
From: aspectj-dev-bounces@xxxxxxxxxxx
[mailto:aspectj-dev-bounces@xxxxxxxxxxx] On Behalf Of Andy Clement
Sent: Wednesday, October 19, 2005 12:56 PM
To: AspectJ developer discussions
Subject: Re: [aspectj-dev] AspectJ Custom Attributes

There is currently no plan to migrate our attributes to annotations. 
We have introduced lots of new annotations in 1.5 to support features
like the @AJ syntax and the meta-aspect protocol (for example:
ajcDeclareEoW), but 'internal' attributes like
'MethodDeclarationLineNumber' are not going to become an annotation in
the 1.5 timeframe.  Attributes are valid entries in the class file, so
why would we need to change them into annotations?  If it is to make
them accessible by 'other tools' then I think the work we have done
creating new annotation types for the MAP support is good enough,
everything other tools should want to know about an aspect is in those
new annotation types - take a look in the
org.aspectj.internal.lang.annotation package...  It is a possible
future item to look into as it would externalize more clearly the form
of everything we put into a classfile...but I don't think it'll happen
soon.

Andy.

On 19/10/05, Eduardo Rocha <eduardorochabr@xxxxxxxxx> wrote:
> There is a thread in the ASM mailing list about AspectJ custom attributes,
> those contained in the class org.aspectj.weaver.AjAttribute:
>
>  http://www.objectweb.org/wws/arc/asm/2005-10/msg00006.html
>
>  Currently ASM doesn't support these attributes, since there is an
> expectation that these attributes get converted into common annotations.
>
>  So what AspectJ 1.5 final will bring? Keep these custom attributes or use
> common annotations?
>
>  Eduardo
>
> _______________________________________________
> aspectj-dev mailing list
> aspectj-dev@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-dev
>
>
>
_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-dev



Back to the top