---
schema_version: "1"
id: d877a35365fcec703b560606b538288d5ca05a5f2e6324960363bc308f9e24d2
title: SymbolTable
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/api_tooling/tooling_api_objects_symboltable.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_symboltable.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: 4afc14520fd5c8c585b4cae75bf78cce3162390eee5719facf44d29c50b3e0cc
description: A complex type that represents all user-defined tokens in the Body of an ApexClass, ApexClassMember, or ApexTriggerMember and their associated line and column locations within the Body.
---
# SymbolTable

A complex type that represents all user-defined tokens in the Body of an ApexClass, ApexClassMember, or ApexTriggerMember and their associated line and column locations within the Body.

## Fields

| Field | Details |
| --- | --- |
| constructors | 
Type

array of Constructor

Description

Contains the position, scope, and signature of constructors for the Apex class. Apex triggers don't have constructors.

Constructor includes the following fields:

- [annotations](#annotations_title)
- location
- [modifiers](#modifiers_title)
- name
- references
- visibility (available only in API versions 33.0 and earlier; scope: Global, Public, or Private)
- parameters





 |
| externalReferences | 

Type

array of ExternalReference

Description

Contains the name, namespace, external class, method, and variable references for the Apex class or trigger. These references can be used for symbol highlighting or code navigation.

ExternalReference includes the following fields:

- methods
- name
- namespace
- references
- variables





 |
| innerClasses | 

Type

array of SymbolTable

Description

Contains a symbol table for each inner class of the Apex class or trigger.



 |
| interfaces | 

Type

array of String

Description

Contains a set of strings for each interface with the namespace and name, for example: \['System.Batchable', 'MyNamespace.MyInterface'\].



 |
| methods | 

Type

array of Method

Description

Contains the position, name, scope, signature, and return type of available Apex methods.

Method includes the following fields:

- [annotations](#annotations_title)
- location
- [modifiers](#modifiers_title)
- name
- references
- visibility (available only in API versions 33.0 and earlier; scope: Global, Public, or Private)
- parameters
- returnType





 |
| name | 

Type

string

Description

The name of the Apex class or trigger.



 |
| namespace | 

Type

string

Description

The namespace of the Apex class or trigger. Null if there is no namespace.



 |
| parentClass | 

Type

string

Description

Returns parents of inner classes and extending classes.



 |
| properties | 

Type

array of VisibilitySymbol

Description

Contains the position, name, scope, and references of properties for the Apex class or trigger.

VisibilitySymbol includes the following fields:

- [annotations](#annotations_title)
- location
- [modifiers](#modifiers_title)
- name
- references
- visibility (available only in API versions 33.0 and earlier; scope: Global, Public, or Private)





 |
| tableDeclaration | 

Type

array of Symbol

Description

Contains the position, name, and references of the Apex class or trigger.

Symbol includes the following fields:

- [annotations](#annotations_title)
- location
- [modifiers](#modifiers_title)
- name
- references





 |
| variables | 

Type

array of Symbol

Description

Contains the position, name, and references of related variables.

Symbol includes the following fields:

- [annotations](#annotations_title)
- location
- [modifiers](#modifiers_title)
- name
- references





 |

## Annotations

Available values for annotations fields include:

- Deprecated
- Future
- HttpDelete
- HttpGet
- HttpPatch
- HttpPost
- HttpPut
- InvocableMethod
- InvocableVariable
- IsTest
- ReadOnly
- RemoteAction
- TestSetup
- TestVisible
- RestResource

## Modifiers

Modifiers can include more values than those values explicitly specified in classes and methods. All relevant modifiers, including implicit ones, are now returned. For example, all webservice methods have an implicit global modifier. Also, because fields and methods are private unless otherwise specified, the private modifier is returned by default.

The testMethod modifier is returned when either the testMethod modifier or the IsTest annotation is used.

Available values for modifiers fields include:

- abstract
- final
- global
- inherited sharing
- override
- private
- protected
- public
- static
- testMethod
- transient
- virtual
- webService
- with sharing
- without sharing

## Usage

Use symbol tables instead of building a parser or compiler. Symbol tables allow you to do symbol highlighting, code navigation, code completion, symbol searches, and more.

A symbol table can’t be created if the content referenced by the ContentEntityId field doesn’t use a symbol table. Compiler errors for the last deployment of the [MetadataContainer](https://developer.salesforce.com/docs/atlas.en-us.api_tooling.meta/api_tooling/tooling_api_objects_metadatacontainer.htm "Manages working copies of ApexClassMember, ApexTriggerMember, ApexPageMember, and ApexComponentMember objects, including collections of objects to be deployed together.") in the MetadataContainerId field also prevent a symbol table from being created.