Analyzer::Apex::Salesforce
Inherits Analyzer < FileHelper < Reference < Object
Salesforce Apex entry points declared in .cls files:
@RestResource(urlMapping='/x/*')+@HttpGet/@HttpPost/... methods are served at/services/apexrest/x/*. Method arguments are the JSON body fields;RestContext.request.params.get('k')reads are query params and.headers.get('k')reads are headers.@AuraEnabled staticmethods are Aura/LWC actions, all POSTed to one/auraendpoint (/s/sfsites/auraon Experience Cloud sites) and dispatched on the action descriptor in the form-encodedmessage. Noir keys endpoints on (method, url), so the descriptor rides in the URL fragment, the same convention as OpenRPC's/rpc#method:POST /aura#apex://CaseController/ACTION$getCases.webservice staticmethods are SOAP operations on/services/Soap/class/<Class>, disambiguated by#<method>.
ponytail: a managed package's namespace prefix (/services/apexrest/ns/...,
apex://ns.Class/...) is not read from sfdx-project.json.
Constants
HEADER_READ_RE = /\.headers\s*\.\s*get\s*\(\s*'([^']+)'\s*\)/i
QUERY_READ_RE = /\.params\s*\.\s*get\s*\(\s*'([^']+)'\s*\)/i
REST_VERBS = {"httpget" => "GET", "httppost" => "POST", "httpput" => "PUT", "httppatch" => "PATCH", "httpdelete" => "DELETE"}
STATIC_RE = /\bstatic\b/i
TAGGER = "apex_analyzer"
URL_MAPPING_RE = /\burlMapping\s*=\s*'([^']*)'/i
WEBSERVICE_RE = /\bwebservice\b/i
WITHOUT_SHARING_RE = /\bwithout\s+sharing\b/i
Class methods
tech_name
SourceInstance methods
analyze
Sourcetech
Instance-side view of the same declaration. The per-file rescues live on
this base class, which has no way to name the analyzer that is running
inside them, so a skipped file could not be attributed to a tech.
Deriving it from analyzer_for keeps the name written exactly once.