class

Analyzer::Java::Javalin

Inherits Analyzer < FileHelper < Reference < Object

Javalin runs on the lambda-DSL routing style: app.get("/x", ctx -> ...) and path("/api", () -> { ... }) nested via app.routes(() -> { ... }). The shared TreeSitterJvmLambdaDslExtractor does the heavy lifting; this analyzer just supplies the Javalin method-name set and turns the raw scan results into Endpoints.

Constants

CONFIG = Noir::TreeSitterJvmLambdaDslExtractor::Config.new(verb_methods: {"get" => "GET", "post" => "POST", "put" => "PUT", "delete" => "DELETE", "patch" => "PATCH", "head" => "HEAD", "options" => "OPTIONS", "query" => "QUERY", "sse" => "GET"}, nest_methods: Set {"path"}, handler_methods: Set {"addHandler", "addHttpHandler"}, crud_methods: Set {"crud"}, transparent_methods: Set {"routes", "before", "after"}, query_methods: Set {"queryParam", "queryParamAsClass", "queryParams"}, form_methods: Set {"formParam", "formParamAsClass", "formParams", "uploadedFile", "uploadedFiles"}, header_methods: Set {"header", "headerAsClass"}, cookie_methods: Set {"cookie"}, body_methods: Set {"body", "bodyAsBytes", "bodyAsInputStream", "bodyInputStream"}, body_typed_methods: Set {"bodyAsClass", "bodyValidator", "bodyStreamAsClass"}, websocket_methods: Set {"ws"})

Javalin's request-context helpers. header and cookie double as response setters, but using them with a single string argument is overwhelmingly the read path — false positives here are cheap (a benign extra param to scan).

JAVA_EXTENSION = "java"
JAVALIN_MARKERS = ["io.javalin"]

Class methods

tech_name
Source

Instance methods

analyze
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