[aspectwerkz-user] args() for variable number of parameters?

Balakrishnan <[email protected]> Thu, 2 Feb 2006 09:33:43 +0000 (GMT)
Newsgroups gmane.comp.java.aspectwerkz.user
Message-ID <[email protected]>
Hi,

Is it possible to write a pointcut with "args()" that
match variable number of arguments? My problem is that
in my JoinPoint class, I want the value of these
parameters.

----

For ex:

public class Test
{
  public String method1(String s) {}
  public String method2(String s,String s1) {}
  public String method3(String s,int i) {}
}

For this class, currently my pointcut is like

execution(* Test.*(..)) AND args(s,..)

and advice is  

methodCheck(JoinPoint j,String s,Object[] otherArgs)

----

Ofcourse, this is giving error and I couldn't write a
pointcut/joinpoint combination that allows me to
select these methods and get the parameter values.

Regards,
Balakrishnan.



		
__________________________________________________________ 
Yahoo! India Matrimony: Find your partner now. Go to http://yahoo.shaadi.com