Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-dev] about the joinpoint.getArgs() function implementation problem of aspectj1.1

Yes ,your methods worked,Thanks Very Much.
----- Original Message -----
Sent: Wednesday, June 18, 2003 4:02 AM
Subject: RE: [aspectj-dev] about the joinpoint.getArgs() function implementation problem of aspectj1.1

This question should be asked on aspectj-users@xxxxxxxxxxx.

 

The short answer is that AspectJ needs to box primitive types in order to put them in an Object[].  This is exactly parallel to API for Method.invoke which expects an Object array.  If you want the actual signature of the method being called, you should use ((CodeSignature)thisJoinPoint.getSignature()).getParameterTypes().    If this is returning the wrong types that should be reported as a bug.

 

-Jim

 

-----Original Message-----
From: hicf@xxxxxxxxxxx [mailto:hicf@xxxxxxxxxxx]
Sent:
Monday, June 16, 2003 10:41 AM
To: aspectj-dev@xxxxxxxxxxx; discuss@xxxxxxxx
Subject: [aspectj-dev] about the joinpoint.getArgs() function implementation problem of aspectj1.1

 

Dear All:

    I 'd like to ask why the current implementation will not return the primitive type  such like int.class or boolean.class .Not the Integer.class or Boolean.class. 

    I currently write a common function to response for the around() for all kinds of pointcut.I use the reflect to invoking the target method.But if the function contain primitive type,this approach will always fail.because the class array construct from the joinpoint.getArgs() return the object class type but not the primitive type.

   Can anybody give me some advice ?

   Great Thanks

                                            Andy Chen


Back to the top