[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] How to define an abstract pointcut with args in aop.xml?
|
Hi,
I am trying to use the abstract pointcut having args in aop.xml.
Sample :
AspectTest.java
public
abstract aspect AspectTest {
abstract
protected pointcut publicTest(int i);
before(int i): publicTest(i) {
System.
out.println("Current arg is " + i);
}
}
aop.xml
<?
xml version="1.0" encoding="UTF-8"?>
<aspectj>
<aspects>
<concrete-aspect name="com.test.aspect.Test1" extends="com.test.aspect.AspectTest">
<pointcut name="publicTest(int i)" _expression_="execution(* com.test.main.Main.fact(..)) AND args(i)"/>
</concrete-aspect>
</aspects>
<weaver options="-verbose -showWeaveInfo, -debug">
<include within="com.test.main.*"/>
</weaver>
</
aspectj>
but while running the Main.java, getting an error that:
[WeavingURLClassLoader] error Abstract method 'void com.test.aspect.AspectTest.ajc$pointcut$$publicTest$528(int)' cannot be concretized as a pointcut (illegal signature, must have no arguments, must return void): <concrete-aspect name='com.test.aspect.Test1' extends='com.test.aspect.AspectTest' perclause='null'/> in aop.xml
[WeavingURLClassLoader] error Concrete-aspect 'com.test.aspect.Test1' could not be registered
need help ASAP......
Regards