Noir::JvmLiteral
The request-ready value a JVM-family (Java / Kotlin / Scala) default expression evaluates to.
A field initialiser or route default is source, not a value, and
Param#value is what every HTTP-shaped consumer puts on the wire — the
curl / httpie / PowerShell builders, the --data-raw JSON body, and the
OAS builders, which publish a non-empty value as an enum entry on the
parameter. So a default that has no literal form has no value either, and
passing the source text through produced things like
{"slug":"title.toSlug()"}, {"addedAt":"LocalDateTime.now()"} and
/api/list-all?version=null.
Shared rather than per-analyzer because Kotlin's and Java's tree-sitter
parameter extractors and both Play routes analyzers were each about to
grow their own copy of the same three-line check, and two of them already
had byte-identical normalize_route_default_value bodies.
Constants
Spellings of "no value": Java/Scala null, Kotlin/Scala None,
Scala/Groovy Nil/nil, and the empty-optional factories.
Numeric literal type suffixes (10L, 1.5f, 2.0d). Stripped before
the numeric test so a suffixed literal is still recognised as one, and
emitted without the suffix — ?page=10L is not a page number.