[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] One target for intertype declarations

Whoops, sorry, missed the modifier. Of course you are right. I also
consider that as a possible place for improvement.

Actually, there would be two copies of the field even if the modifier were "public". Variables, unlike methods, are not overridden. They can be shadowed, but you can still access both copies on a given object.


Cheers,

Nicholas Lesiecki
Software Craftsman, specializing in J2EE,
Agile Methods, and aspect-oriented programming
m: 520 591-1849

Books:
* Mastering AspectJ: http://tinyurl.com/66vf
* Java Tools for Extreme Programming: http://tinyurl.com/66vt

Articles on AspectJ:
* http://tinyurl.com/66vu and http://tinyurl.com/66vv
On Nov 23, 2004, at 4:17 PM, Eric Bodden wrote:


-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1

David Pearce wrote:
Hi Erik,

So in a nutshell you don't have two fields but two declarations of
one
and the same field. (If the field had been static that would have
been
a different thing)

Ok, I am getting confused now. You seem to be saying that although we have two declarations of the field there will actually only be copy of it in test2. Even though it's declared private in both test and test2?
Whoops, sorry, missed the modifier. Of course you are right. I also
consider that as a possible place for improvement.

Eric

- --
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQaPFIMwiFCm7RlWCEQLf7QCgvAJl6i/r26bMUhgfEnAebx1hkwsAnjB8
hTkm5buuYQHoYBxSCP4V5CMv
=DLTg
-----END PGP SIGNATURE-----


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