Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Troubles with packages and pointcuts


Hi Cyrill,

I cannot recreate what you are describing. Please could you send me, off list, an Eclipse project that shows up this problem. The smaller the project, the better.

Thanks,
George
________________________________________
George C. Harley



Cyrill Rüttimann <ruettimac@xxxxxxx>
Sent by: aspectj-users-admin@xxxxxxxxxxx

28/10/2004 18:04

Please respond to
aspectj-users@xxxxxxxxxxx

To
aspectj-users@xxxxxxxxxxx
cc
Subject
[aspectj-users] Troubles with packages and pointcuts





Hi,

I have troubles with packages. My pointcuts only advice the method if
the pointcut is in the same package as the advices method. I have no
glue why. Following my setup:


Library with an abstract aspect (AbstractContractAspect). The library
is in the classpath of the application.

public abstract aspect AbstractContractAspect {

    /**
     * Abstract pointcut. This pointcut has to be implemented by the
concrete
     * class to advice a method call.
     *
     * @since 25.10.2004
     */
    public abstract pointcut targetPointcut();




The application implements the abstract aspect in package x.y.aspect.
From there I implement the pointcut for method xy in package x.y.

public pointcut targetPointcut() : execution(*
ContractShowCase.dummyMethod(..));


But the method will not be adviced. I have to modify the pointuct as
follows:

public pointcut targetPointcut() : execution(* *.dummyMethod(..));

or place the aspect in the same package as the class with the advices
method. Then the first version of the pointcut work.


For me, that is not the normal behaviour. Right? Any hints?

aspectj 1.2, AJDT 1.1.12

If you like, I can send you an eclipse project off list.


Regards,

Cyrill

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


Back to the top