I was just trying to create the problem here but I can't seem to, here is
my little test program:


*aspect* Az {

*  before*(): *call*(* A.m(..)) {

    System.out.println(*thisJoinPoint*.getArgs().length);

*    for* (*int* i=0;i<*thisJoinPoint*.getArgs().length;i++) {

      System.out.println(*thisJoinPoint*.getArgs()[i]);

    }

  }

}


*public* *class* A {

*  public* *static* *void* main(String []argv) {

*    new* A().m(1,"abc",3.0f);

  }

 *  public* *void* m(*int* i, String s, *float* f) {}

}


Which does what you'd expect, prints 3, 1, abc, 3.0. What is different in
your setup?  Does the method you are advising perhaps use varargs?


cheers

Andy


On 20 December 2012 09:49, jagan_jkk <[email protected]> wrote:

> Hi Team,
>     I am using a advise to capture the method call, I have JoinPoint as my
> parameter. I am getting Object array with only one argument, where as I
> have
> more than one argument in the callee method.
>
> I am using Jdk 1.5, Intellij Idea and aspectj 1.7
>
> Please help.
>
> Thanks and regards,
> Jagadeesh J
>
>
>
> --
> View this message in context:
> http://aspectj.2085585.n4.nabble.com/JoinPoint-getArgs-s-second-argument-is-not-working-tp4650681.html
> Sent from the AspectJ - users mailing list archive at Nabble.com.
> _______________________________________________
> aspectj-users mailing list
> [email protected]
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
[email protected]
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to