Apex-specific features and guidance
Table of Contents

Apex is a strongly typed, object-oriented programming language that allows developers to execute flow and transaction control statements on the Salesforce Platform server, in conjunction with calls to the API.

Language Info for Apex

Metrics framework

In order to use code metrics in Apex, use the metrics constants in ApexMetrics, together with MetricsUtil.

Multifile Analysis

Integration happens in ApexMultifileAnalysis. It uses ApexLink. For detailed information, see also Apexlink POC #2830.

Used for rule UnusedMethod

Language Properties

See Apex language properties

Parser

Since PMD 7.0.0 we use the open source apex-parser, together with Summit AST which translates the ANTLR parse tree into an AST.

When PMD added Apex support with version 5.5.0, it utilized the Apex Jorje library to parse Apex source and generate an AST. This library is however a binary-blob provided as part of the Salesforce Extensions for VS Code, and it is closed-source.