Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » Java Development Tools (JDT) » JDT AST: Finding whether a callee method returns value of an instance variable
JDT AST: Finding whether a callee method returns value of an instance variable [message #992588] Sat, 22 December 2012 02:37
Bhanuka Withana is currently offline Bhanuka WithanaFriend
Messages: 1
Registered: December 2012
Junior Member
I'm using Eclipse JDT AST to parse a given java source code. While parsing the code, when it hits a method invocation, I want to find out whether that particular method returns or sets a value of an instance variable (basically to find out whether the callee method is a getter/setter of the same class of caller method).

E.g.:

public void test(){
//when parsing the following line I want to check whether "getName"
//returns a value of an instance variable.
String x = getName();

//when parsing the following line I want to check whether "setName"
//sets the value of an instance variable.
setName("some-name");
}
I've used the AST plugin also find out a possible path which would help me to refer it from the API, but couldn't. Please let me know whether this is possible and if so, which approach that would help me to get the required information.
Previous Topic:Code Assist Not Work In Ubuntu 12.04
Next Topic:Eclipse svn and hudson
Goto Forum:
  


Current Time: Fri Apr 26 03:54:43 GMT 2024

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

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

Back to the top