[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] Abstract pointcut with arguments
|
-------------------------------------------------------------------
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public abstract class Parent
{
@Pointcut
protected abstract void anything(Object o);
}
-------------------------------------------------------------------
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class Child extends Parent
{
@Pointcut("target(o)")
protected void anything(Object o) {}
}
-------------------------------------------------------------------
The command
ajc -verbose -g -source 1.5 Parent.java Child.java
gives
Parent.java:5 [error] Cannot read debug info for @Aspect to handle
formal binding in pointcuts
(please compile with 'javac -g' or '<javac debug='true'.../>' in Ant)
The following example
-------------------------------------------------------------------
import org.aspectj.lang.annotation.Aspect;
import org.aspectj.lang.annotation.Pointcut;
@Aspect
public class Concrete
{
@Pointcut("target(o)")
protected void anything(Object o) {}
}
-------------------------------------------------------------------
compiles without problems.
Thanks,
Assen Sotirov
_________________________________________________________________
Express yourself instantly with MSN Messenger! Download today it's FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/01/