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 causingcreation of extra methods in an interface

> 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. 

  Ok. I thought the introduced variables & advice would be woven into
the actual implementing classes without any effect on the interface
itself. This would be much less intrusive as it doesn't really matter
that the classes have extra methods / members.
  Is there some particular reason why the interface is littered w/ the
new abstract methods instead of the necessary extra methods / fields
being directly introduced into the implementing classes? I guess it may
make the compiler a bit simpler to implement, but on the other hand it
forces the implementers of the interface to use AspectJ, too. This may
be too much to ask, as the implementers may be "outsiders" e.g. if your
application supports plug-ins that just have to implement one or more
interfaces. The end-users may know Java, but they can not (yet) be
expected to be "aspectj aware". 


> Inter-type fields are always access through getter/setter methods.
Bottom line users of the interface 
> will need to be compiled with ajc.

  In this case this may be a problem, so I guess I'll just have to strip
out the aspect and do the same things the old fashioned way (darn). 


  Thanks for the reply.

 

     -Antti-





Back to the top