• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Eclipse AspectJ Question

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic