Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Using inter-type declaration in base class

Hi again,

I just figured out it is only Eclipse who indicates an error.
The program actually compiles fine and the public variable is indeed
usable in other classes.

The guys working on AJDT probably know about this, right?

Cheers
Martin

----- Original Message -----
From: "Martin Goerg" <nimoth@xxxxxxxxxxxxxxx>
To: "Martin Görg" <nimoth@xxxxxxxxxxxxxxx>
Sent: Thursday, October 18, 2007 3:29 PM
Subject: Re: Using inter-type declaration in base class

Hi,

I have a
class A {}
and then introduce a new filed with
aspect AugmentA { public int A.x == 0; } .

As I understand it, because x is public, I should be able to use it in
A. But the following code produces a compiler error.

clas A { void incX() { x++ }; }

What am I doing wrong or what is the concept of the public modifier
for inter-type declarations?

Thank you for help

Cheers
Martin



Back to the top