Skip to content

RelatedCodeTabsController

pozil edited this page Nov 14, 2024 · 15 revisions

RelatedCodeTabsController Class

Apex server side controller for discovering other classes related to the one being viewed

Group Shared Code

See ApexClassUtilities

Methods

getRelatedClasses(mainClassName)

SUPPRESSWARNINGS AURAENABLED

Inspects the ApexClass body definition for a @see tag in the opening class level doc block. It then parses the comma separated list and returns it as a list of strings

Note: this method contains a false-positive PMD violation. Normally, we'd want to check for FLS/CRUD here, but for ApexClass a system level object that Admins and users cannot really change we're ok.

Signature

public static List<String> getRelatedClasses(String mainClassName)

Parameters

Name Type Description
mainClassName String The name of the class to inspect

Return Type

List<String>

Example

System.debug(RelatedCodeTabsController.getRelatedClasses('RelatedCodeTabsController'));
Clone this wiki locally