Skip to main content

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

Dear Andy, and Jordi,
to what I can understand Jordi's problem is related to an abstract
aspect (B) which extends another abstract aspect (A). Jordi's is
wondering why Eclipse complains about a still abstract pointcut in an
abstract aspect.

Without Jordi's code I can just suppose that Jordi didn't specify the
abstract keyword in the definition of B.

Just my 2¢

Walter

On Wed, 30 Jul 2008, Andy Clement wrote:

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




--
Walter Cazzola, PhD - Assistant Professor, DICo, University of Milano
E-mail cazzola@xxxxxxxxxxxxx Ph.: +39 02 503 16300  Fax: +39 02 503 16100
· · · ---------------------------- · · · ---------------------------- · · ·
               ... recursive: adjective, see recursive ...
· · · ---------------------------- · · · ---------------------------- · · ·

Back to the top