class
Analyzer::Java::Javalin
- Analyzer::Java::Javalin
- Analyzer
- Reference
- Object
Overview
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.
Defined in:
analyzer/analyzers/java/javalin.crConstant Summary
-
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.
headerandcookiedouble 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"]