1

How can I query and get Standard Apex classes and their Symbol table via tooling API or Partner API?

For eg: getting a custom Apex Class :

String apexClassBodytooling = "SELECT Id, Name, SymbolTable FROM APEXCLASS";
com.sforce.soap.tooling.QueryResult qResult = toolingConnection.query(query);

which return APex Classes and the Symbol table.

But how to query standard classes such as "List", "System", "Database" etc...?

2

Not quite sure what’s your use case but with what you are looking for —

But how to query standard classes such as "List", "System", "Database" etc...?

You can never. These are platform abstracted contracts which enables you to build an application using these contracts. No platform will ever let you manipulate these contracts (unless it’s open sourced, but not in this case) as it will lead to security vulnerability.

As for Tooling API, it interacts with metadata and supports what is available as defined here.

  • I am trying to build an IDE with auto code completion for Apex. For now I have managed to do it for Custom classes and was looking forward to use in Standard Classes too. – Nagendra K S May 16 '18 at 3:38
  • What you are looking for is to kind of create a LR parser. It's definitely out of scope of the APIs that you are referring. All APIs made available are more application centric, whereas to build anything like LR parser, you need to go to a much deeper level which definitely is not achievable by the way you are trying to. – Jayant Das May 16 '18 at 3:50
  • What do you mean by deeper level? Can you give a brief idea how to proceed? – Nagendra K S May 16 '18 at 4:09
  • What I mean is that you need to explore other ways as how to write an ide. This is not achievable by the apis provided but needs a “deeper” understanding of how compiler works etc. – Jayant Das May 16 '18 at 11:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.