Skip to main content

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

On Thu, Jul 3, 2008 at 6:19 PM, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> Hi,
>
> You need to make the pointcuts public.

Ah, such a simple solution :-). Thanks for the hint.

I can't hold myself back from saying that the error messages could be
improved though...

~David

> cheers,
> Andy.
>
> 2008/7/3 David Mohr <dmohr@xxxxxxxxxx>:
>> Hi,
>> I am using eclipse right now to do my aspectj coding, and I can't seem
>> to create a concrete aspect in package x from an abstract aspect in
>> package y. I always get the error:
>>  "inherited abstract pointcut bar.PrintAround.method() is not made
>> concrete in foo.PrintAroundFoo"
>>
>> Here is a small example that exhibits this issue:
>>
>> package bar;
>>
>> public abstract aspect PrintAround {
>>
>>        abstract pointcut method();
>>
>>        Object around(): method() {
>>                System.out.println("-before-");
>>                Object r = proceed();
>>                System.out.println("-after-");
>>                return r;
>>        }
>>
>> }
>> //---------------------------------------------------
>>
>> package foo;
>>
>> public class Foo {
>>        public static void main (String[] args) {
>>                System.out.println("foo!");
>>        }
>> }
>> //---------------------------------------------------
>>
>> package foo;
>>
>> import bar.PrintAround;
>>
>> public aspect PrintAroundFoo extends PrintAround {
>>
>>        pointcut method() : call (void Main(String[]));
>>
>> }
>> //---------------------------------------------------
>>
>> I worked around this issue before, but right now I'm trying to create
>> a library of aspects, and it's a pain that I have to make the aspects
>> always be part of the application namespace.
>>
>> Thanks,
>> ~David
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>


Back to the top