function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
freshstart forcefreshstart force 

Reflection / Introspection Support

Does Apex have Reflection / Introspection sort of support?




Does anybody know the answer to this?

No, the best you can do is cast the apex objects to JSON and parse. But that wont give you the datatype, property scope or methods.

see JSON.serialize()
Apex supports introspection using by using tokens or the describeSObjects Schema method. DescribeSObjectResult has about 26 methods, including getSobjectType(), isCustom(), & getChildRelationships()

You can get methods using the tooling api.