i have a variable of type VariableDeclarationStatement. I want to get the name of the method from this variable . How can i do that?Help
i have a variable of type VariableDeclarationStatement. I want to get the name of
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You could use the code in this thread and use an
VariableDeclarationFragment:To get the method in which this (variable) is defined, I would use a visitor of the
CompilationUnit, looking for thatVariableDeclarationFragmentwhile memorizing theIMethodI am currently parsing: