class

Analyzer::Scala::Finatra

Inherits Analyzer::Scala::ScalaEngine < FileScanEngine < Analyzer < FileHelper < Reference < Object

Finatra HTTP controllers: get("/users/:id") { request: Request => ... } inside a class extending Controller, with prefix("/x") { ... } blocks composing a path prefix. ponytail: router.add("/v1", ...) registration prefixes and typed request case classes (@RouteParam/@QueryParam) are not followed yet.

Constants

CONTROLLER_RE = /\bextends\s+(?:[\w.]+\.)?Controller\b/
PARAM_READ_RE = /request\.(?:params(?:\.\w+)?|get(?:Int|Long|Short|Boolean)?Param)\s*\(\s*"([^"]+)"/

request.params("q"), any ParamMap accessor (params.get, params.getInt, ...) and Finagle's getParam / getIntParam family.

PREFIX_RE = /(?:(?<![.\w])|(?<=\]\.))prefix\s*\(\s*"([^"]*)"/
ROUTE_RE = /(?:(?<![.\w])|(?<=\]\.))(get|post|put|patch|delete|head|options|any)\s*(?:\[[^(]*\])?\s*\(\s*"([^"]*)"/

Class methods

tech_name
Source

Instance methods

analyze_file(path : String) : Array(Endpoint)
Source
tech

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.

Source