Skip to main content


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 徐 兵Friend
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 MerksFriend
Messages: 33133
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.


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Any plugin that auto-completes css class names
Next Topic:Include my code formatter in the plugin package
Goto Forum:
  


Current Time: Thu Apr 18 07:58:58 GMT 2024

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

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

Back to the top