Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] Declaring final inter-type fields/methods/etc


Hi Keven,

I was going through the AspectJ bugs earlier on today, and I believe there is one that
covers what you are describing:

Bugzilla Bug 52105: final static constant fields not treated as such

Here is a direct link, there is quite a bit of discussion in the bug report:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=52105

Basically we don't make them final because they get initialized in the aspect rather than
the type upon which you make the declaration.  If they were final we wouldn't be able to do this.

The bug is still open and we haven't decided how to resolve it yet ...

Andy.



Keven Ring <keven@xxxxxxxxx>
Sent by: aspectj-dev-admin@xxxxxxxxxxx

02/09/2004 14:55

Please respond to
aspectj-dev@xxxxxxxxxxx

To
aspectj-dev@xxxxxxxxxxx
cc
Subject
[aspectj-dev] Declaring final inter-type fields/methods/etc





Is there a particular reason why it is legal to do the following:

aspect InterTypeDeclarer {
 public static final int MyClass.NEW_VARIABLE = 1;
}

yet, the <final> tag is ignored?

That is, a new variable is created in MyClass, however, it is defined as
public, and static, but not final.

If this is not allowed, or supported, then why is it not a compiler
error or warning.

Thanks!

--
Keven Ring               | "Oh no,  Not Again..."
The MITRE Corporation    |   Bowl of Petunias -
7515 Colshire Drive      |   The Hitchhikers Guide to the Galaxy
McLean VA 22102-7508     |
PH: (703)883-7026        |



_______________________________________________
aspectj-dev mailing list
aspectj-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-dev


Back to the top