Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
RE: [aspectj-users] getting reflection.Method from a thisJointPoint

Title: [aspectj-users] getting reflection.Method from a thisJointPoint

Hi,

 

            Yes, thanks. That did the trick!

 

Regards,

 

Kostas

 


From: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-bounces@xxxxxxxxxxx] On Behalf Of Ron DiFrango
Sent: Thursday, March 15, 2007 1:43 AM
To: aspectj-users@xxxxxxxxxxx
Subject: RE: [aspectj-users] getting reflection.Method from a thisJointPoint

 

Kostas,

 

I think you can get to this via the get signature method see the following:

 

 

The way I understand it you can do the following:

 

MethodSignature sig = (MethodSignature)thisJoinPoint.getSignature();

Which has a method called getMethod() which returns java.lang.reflect.Method

Ron DiFrango


From: aspectj-users-bounces@xxxxxxxxxxx on behalf of Konstantinos Kougios
Sent: Wed 3/14/2007 6:02 PM
To: aspectj-users@xxxxxxxxxxx
Subject: [aspectj-users] getting reflection.Method from a thisJointPoint

Hi,

    I want to read annotation information using reflection. I apply an
around advice in some of my methods, and I need to get the Method or the
Annotation. Neither thisJointPoint nor  thisJoinPoint.getSignature();
contain a method to return the reflection.Method instance. But when I
debug, I see that the implementation of the Signature has that
information. Unfortunately the impl of the signature class is private
and can't cast it.

I can hack and get the variable, but is there a normal way of getting
the Method instance?

Thanks,

Kostas

_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users


______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________

Back to the top