Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » How to get call stack by analysing ast?(By traversal of ast tree,how to locate the accurate implements of a given interface)
icon12.gif  How to get call stack by analysing ast? [message #1065487] Wed, 26 June 2013 02:45 Go to next message
徐 兵 is currently offline 徐 兵
Messages: 1
Registered: June 2013
Junior Member
Hi all,I am a QA and encount a problem that i need to know what would be affected by the code changes dev made.

There came an idea for me that i could analysis ast for each java file to get its calling relationship.

When analysing ast, i choose MethodInvoke node so that i could get the caller and callee.Then i encount my problem that i found the callee i got is a interface for which i can find many implement,but i can't distinguish which one is the actually called one.

Any ideas/comments/questions would be greatly appreciated.
Re: How to get call stack by analysing ast? [message #1065605 is a reply to message #1065487] Wed, 26 June 2013 16:03 Go to previous message
Ed Merks is currently offline Ed Merks
Messages: 26137
Registered: July 2009
Senior Member
If I understand the question correctly, you can't statically know (in
general) which implementation class will be used at runtime by a call
through an interface.


On 26/06/2013 3:23 PM, 徐 兵 wrote:
> Hi all,I am a QA and encount a problem that i need to know what would
> be affected by the code changes dev made.
>
> There came an idea for me that i could analysis ast for each java file
> to get its calling relationship.
>
> When analysing ast, i choose MethodInvoke node so that i could get the
> caller and callee.Then i encount my problem that i found the callee i
> got is a interface for which i can find many implement,but i can't
> distinguish which one is the actually called one.
>
> Any ideas/comments/questions would be greatly appreciated.
Previous Topic:Any plugin that auto-completes css class names
Next Topic:Juno: can't add GlassFish resource to a project
Goto Forum:
  


Current Time: Thu Oct 23 03:51:36 GMT 2014

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

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