Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Archived » Test and Performance Tools Platform (TPTP) » Finding the Declaring Class in MethodInvocation
Finding the Declaring Class in MethodInvocation [message #93553] Thu, 15 March 2007 13:59
Anirudh  is currently offline Anirudh Friend
Messages: 22
Registered: July 2009
Junior Member
Hi,

I am attempting to statically analyze a piece of code. I need to find out
the declaring class for a method being invoked. For this, i am getting all
the methods invoked in a class (or in a method). I obtain an instance of
MethodInvocation. From this i can obtain the name of the method being
invoked, but i do not know how to obtain the declaring class.

To illustrate:

SomeClass sc = new SomeClass();
sc.callAMethod();

MethodInvocation can tell me the name of the method (callAMethod) and also
the name of the type (sc), but i cannot directly obtain the declaring type
(SomeClass).

Is there any way i can do this? Is using MethodInvocation the wrong way of
doing this? I am using TPTP's static analysis and trying to plug in my own
rule.

Thanks in advance,
Anirudh
Previous Topic:GetCurrentThreadCpuTime
Next Topic:Install Woes - Could not open perspective ... org.eclipse.hyades.trace.internal.
Goto Forum:
  


Current Time: Tue Mar 19 11:03:17 GMT 2024

Powered by FUDForum. Page generated in 0.02019 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top