Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Default implementations in an interface causing creation of extra methods in an interface




Antti,

Also in your case you have adding an inter-type field. Again interfaces
cannot declare non-final static fields so the field will actually belong to
an implementing class. Inter-type fields are always access through
getter/setter methods. Bottom line users of the interface will need to be
compiled with ajc.

Matthew Webster
AOSD Project
Java Technology Centre, MP146
IBM Hursley Park, Winchester,  SO21 2JN, England
Telephone: +44 196 2816139 (external) 246139 (internal)
Email: Matthew Webster/UK/IBM @ IBMGB, matthew_webster@xxxxxxxxxx
http://w3.hursley.ibm.com/~websterm/

"Antti Karanta" <antti.karanta@xxxxxxx>@eclipse.org on 30/03/2005 07:32:09

Please respond to aspectj-users@xxxxxxxxxxx

Sent by:    aspectj-users-bounces@xxxxxxxxxxx


To:    <aspectj-users@xxxxxxxxxxx>
cc:
Subject:    [aspectj-users] Default implementations in an interface causing
       creation of extra methods in an interface




                           Hi!

  I just stumbled into a strange thing. I have an interface that I
provide some default implementations (using introductions) and advice.
All works fine. Now, I tried to implement this interface in an
non-aspectj project using the jar produced by ajc and the compiler
complained I have to implement a bunch of methods that have obviously
been introduced into the interface by the aspectj compiler, e.g.

Class must implement the inherited abstract method
Transaction.ajc$interFieldGet$fi_napa_core_tableprocessing_transfer_link
_TransactionDefaultImplementationAspect$fi_napa_core_tableprocessing_tra
nsfer_link_Transaction$_isClosed()         SimpleReadTransaction.java
sample_link/src/fi/napa/core/tableprocessing/transfer/link/sample
line 34            March 30, 2005 9:23:09 AM

  Now, if I want to provide an interface I want others to be able to
implement (without necessarily using aspectj), can I not use advice &
introductions for it within my own project?



      -Antti-




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




Back to the top