On 10/19/07, Mike Schneider <[EMAIL PROTECTED]> wrote:
> How would I write an aspect that would restrict the use of static fields?
>
> Such that compiling something simple like this:
>
> class X {
> static int c; // bad
> int d; // ok
> }
>
>
> would result in a compiler warning/error for c, but not d.
Using hasfield pointcuts, it would be possible to at least emit a
warning/error for the class, I guess. It is an experimental feature
though:
https://bugs.eclipse.org/bugs/show_bug.cgi?id=86818
If you like it, vote for it.
Regards,
Michael Nascimento Santos
https://genesis.dev.java.net/
https://jsr-310.dev.java.net/
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users