Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Abstract aspects

Just as a concrete class at the bottom of a hierarchy must implement any inherited abstract methods, so a concrete aspect must provide a definition ('concretize') any abstract pointcuts it inherits, otherwise it is still an abstract aspect.

abstract aspect Foo {
  abstract pointcut scope();

  before(): execution(* *(..)) && scope() {
      System.out.println("Entering >"+thisJoinPoint);
  }
}

aspect Goo extends Foo {
  // must provide a definition of scope()
  pointcut scope(): within(com.mypackages..*);
}

Andy.

2008/7/30 Jordi Monné <jmonne@xxxxxxxxx>
Hi all.

I was working on some exercises to learn how AspectJ works. One of them was to see how to extend abstracts aspects with AspectJ. I was trying to do something like this:

B(abstract) extends A(abstract)
C(concrete) extends B(abstract).

Where A,B,C are aspects.

I was wondering why Eclipse says to me that an inherited pointcut from A was not made concrete in B. I read "Aspects extending aspects" from http://www.eclipse.org/aspectj/doc/released/progguide/semantics-aspects.html#aspect-extension but it didn't help to me at all.

Can someone give me some light about it?.

Any help or pointers would be most appreciated.

Thanks.



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



Back to the top