title: Java accessing function call parameters via AspectJ
body: <pre><code>package a;
      Class X
          public fX(int i, String s);
  
  package b;
      Class Y
          public fY(String arg1, String arg2, int arg3){
              ...
              ClassX.fX(1,"testY");
              // Need to execute some stuff right here after this call
  
          }
  
      Class Z
          public fZ(int n, int m){
              ClassX.fX(2,"testZ");
          }
  </code></pre>
  
  <p>I need such a pointcut and advice that it will point to 
  right after ClassX.fX(1,"testY") method call and will give me access 
  to ClassY.fY(String arg1, String arg2, int arg3) function call arguments (i.e arg1, arg2 and arg3) at the same time,</p>
  
  <p>I tried this one but it didnt work.</p>
  
  <pre><code>pointcut ParameterPointCut(String arg1, String arg2, int arg3) :
      withincode (public String ClassY.fY(String,String,int))&amp;&amp;
      call(public String ClassX.fX(int, String)) &amp;&amp;
      args(arg1,arg2,arg3);
  
  
  after(String arg1, String arg2, int arg3): ParameterPointCut(arg1,arg2,arg3){
          System.out.println("arg1 =" + arg1);
      }
  </code></pre>
  
  <p>What would be the pointcut and advice changes to take those values in the correct place?</p>
  
  <p>Thanks in advance.</p>