hi,
Was evaluating AspectJ when i ecounter this problem. Hopefully someone
can enlighten me.
AspectJ compiler ver 1.2.1
JDK compiler ver 1.5.0_01-b08
Linux kernel 2.6.10-1.760_FC3
------ JTest.java --------
public class JTest {
public void prtSomeThing(){
System.out.println("Hello World");
}
public static void main(
String[] args){
JTest jt = new JTest();
jt.prtSomeThing();
}
}
--------------------------
------- JTestAspectJ.aj -------
public aspect JTestAspectJ {
pointcut logAllSystemPrint() : call(* System.out.println(..));
before() : logAllSystemPrint(){
System.out.println("Before Method");
}
}
--------------------------------
After compiling the two codes above, i got this error:
ajc -classpath $CLASSPATH JTest.java JTestAspectJ.aj
/home/tomcat/aspectj/Test/JTestAspectJ.aj:17 [warning] no match for this type name: System.out [Xlint:invalidAbsoluteTypeName]
pointcut logAllSystemPrint() : call(* System.out.println(..));
^^^^^^^^^^^^^^^^
Why is there no match for 'System.out.println(..)' ?
I've tried these and they all don't work.
call(* System.out.*(..))
call(* System.out.println(String))
regards,
Freddy