Newer Version Available

This content describes an older version of this product. View Latest

ApexClass

Represents the saved copy of an Apex class. ApexClass uses the cached version of the class unless one is unavailable. Available from API version 28.0 or later.

To edit, save, or compile Apex classes, use ApexClassMember.

Supported SOAP API Calls

create()delete()describeSObjects()query()retrieve()update()upsert()

Supported REST API HTTP Methods

Query, GET, POST, PATCH, DELETE

Fields

Field Name Details
SymbolTable
Type
SymbolTable
Properties
Nillable
Description
A complex type that represents all user-defined tokens in the Body of an ApexClass, ApexClassMember, or ApexTriggerMemeber and their associated line and column locations within the Body.

This field is null if the symbol table cannot be created.

Usage

To retrieve information about an Apex class, create an ApexClass object that references it. For example code, see Use Tooling API with SOAP.

To edit, save, or compile Apex classes, use ApexClassMember.

If there is not a cached version of SymbolTable, it will be compiled in the background and the query might take longer than expected. The SymbolTable returned from ApexClass does not contain references; to retrieve a SymbolTable with references, use ApexClassMember.

Note