Community
Participate
Working Groups
This fails on ajc 1.5.2 and a similar program failed on recent dev builds. Work-around: make the pointcut explicitly public. Failing Program: package sub; public interface Interface { pointcut foo() : execution(* foo()); } package user; import sub.Interface; public aspect Caller { before() : Interface.foo() {} } >ajc sub\Interface.java user\Caller.java C:\devel\scratch\interfacePcd\user\Caller.java:7 [error] pointcut declaration po intcut sub.Interface.foo() is not accessible before() : Interface.foo() {} ^^^^^^^^^^ 1 error
The programming guide notes that methods defined on interfaces need not be public, so I'm not sure why pointcuts must be. -------------------------------- Any intertype declaration of an abstract method on an interface must be specified as public, you will get a compile time error message indicating this is a compiler limitation if you do not specify public. A non-abstract method declared on an interface can use any access modifier except protected. Note that this is different to normal Java rules where all members declared in an interface are implicitly public. ---------------------------------