Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] Field names for generic aspects

Hi All,

I have another quick question about generic aspects.  Consider this:

> class Test {}
>
> aspect TestAspect<T> {
>  interface HasTest {}
>
>  declare parents : T implements HasTest;
>
>  private int HasTest.x = 0;
> }

So, the question is, for TestAspect<Test>, what does the actual name for the x field which is inserted into Test look like? I imagine something like this:

> int ajc$interField$TestAspect$Test$HasTest$x;

Does that seem about right? I guess the crucial point is that Test has been included in this name, since it is the concrete type of T.

Cheers,

Dave


--
Lecturer in Computer Science,
School of Mathematics, Statistics and Computer Science,
Victoria University of Wellington,
PO Box 600,
Wellington,
New Zealand.

Office: Cotton 231
Telephone: +64 4 463 5833
URL: http://www.mcs.vuw.ac.nz/~djp


Back to the top