I am interested in being able to get information about classes, specifically variables, methods etc. I see this can be done by the Tooling API, what I am not clear on is if I need to make an API call to do this even when I am in my developer instance?
In other words, is there no way to directly query this information without the API call? I see in the Query Editor there is a checkbox for "Use Tooling API" right next to the Execute button.
When I select this checkbox I can directly query the symbol table of an object in the query editor, so I am thinking there must be a way to do this from withing a class without the API call?
All the documentation I have found if for using this with the API call however...
ApexClass
object that you can use SOQL to query, the symbol table detail is only exposed via the Tooling API. However you can invoke that from Apex code - see Apex Tooling API - SOAP Edition. You may also find useful information and links in this post How can I find unused methods and variables?.