Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] strange behaviour with abstract aspects and introductions

hi,

i have a problem when working with abstract aspects and
introductions accross multiple projects.

the setting is as follows

interface IFoo { void doFoo(){...}}
interface AspectedFoo extends IFoo{}

public abstract AspectedFooImpl{
  public void AspectedFoo.doFoo(){...}}

public abstract AspectedFooFilter extends AspectedFooImpl{
  public pointcut foo():
        execution(public void doFoo())
    &&  target(AspectedFoo+);

    Object around(): foo(){...}}


ok this is so to say the setup. an interface which gets
extended and the extension gets implemented by an aspect.
then the implementation aspect is extended again by an other
aspect that defines some pointcut.

now here the users of it.

public aspect DefaultAspectedFooImpl extends AspectedFooFilter{
  declare parents: Bar implements AspectedFoo;}


now everything works fine as long as all is within the same
project. i however i put DefaultAspectedFooImpl into an
other project and use the other files as an aspect library
i get the following errors

[iajc] ...: implementors of AspectedFoo must be woven by
            AspectedFooImpl
or
[iajc] ... Class must implement the inherited abstract method ...

now the interessting part is if i switch the inheritance order to

public abstract AspectedFooFilter {...}
public abstract AspectedFooImpl extends AspectedFooFilter { ... }

everything works fine. seems like abstract aspects implementing
an interface may not be extended again by an other abstract aspect.

is this by purpose or is this a bug?

env:
- java 1.4.2_03
- suse linux 9.0
- aspectj 1.2 beta build 2003-03-05

ciao robertj


Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


Back to the top