I am trying to write a simple code analyzer / metadata extractor in Java. For the beginning, all I want to do is extract and differentiate instance and local vars, and methods and their signatures and associate local vars to methods they belong to in much the same way Eclipse displays them in its Outline view. Of course, this is possible to do by simple text parsing but that is obviously an extremely onerous and tedious method, definitely reinventing the wheel. Since the compiler already parses the source code, I would like to leverage its functionality to extract the metadata in a clean, easy, and elegant way.
Any idea which API to use to accomplish this? Can anyone point to an API within Eclipse that I can use to do this (as I am sure it exists)?
Thanks