-
Notifications
You must be signed in to change notification settings - Fork 519
ApexClassUtilities
codefriar edited this page Oct 15, 2020
·
19 revisions
Contains reusable code dealing with ApexClass objects. This is primarily used by the LWC components for displaying code in an org.
RecipeTreeViewController, FormattedRecipeDisplayController
Extracts the @group annotation from a class' body. Also demonstrates the use of Regex matchers in Apex.
| Param | Description |
|---|---|
klass |
an ApexClass object |
ApexClass klass = [SELECT Name, Body FROM ApexClass LIMIT 1];
System.debug(ApexClassUtilities.getGroupBodyFromClassBody(klass));Extracts the @see annotation from a class' body. Also demonstrates the use of Regex matchers in Apex.
| Param | Description |
|---|---|
klass |
an ApexClass object |
ApexClass klass = [SELECT Name, Body FROM ApexClass LIMIT 1];
System.debug(ApexClassUtilities.getRelatedClassesFromClassBody(klass));