List class methods dynamically

Is there a way to programmatically get a list of methods of a specified class?

I know I can get the class body by querying ApexClass. However, this just gives a string that I should then parse. Parsing is ok, but I would like to avoid it if there is a better method to do this.

What I’d like to get is only what already exists in Salesforce. When you go to Setup->Develop->Apex classes, choose a class and open the tab “Class summary”, you can see the list of properties and methods with their signatures.
So, do you know of any way to get to the same information programmatically?


The new Tooling API provides this access. Access to this data through Apex Code may be limited, however, depending on the size of the classes, etc involved. This is definitely something that would work through Visualforce though (which is basically how the Developer Console works; by leveraging the Tooling API to deploy code and build symbol maps).

Source : Link , Question Author : zdropic , Answer Author : sfdcfox

Leave a Comment