struct

Noir::TreeSitterKotlinParameterExtractor::FieldInfo

Inherits Struct < Value < Object

Constructors

new(name : String, access_modifier : String, has_setter : Bool, init_value : String, null_validation_groups : Array(String) = [] of String, server_managed : Bool = false, validation_annotations : Array(String) = [] of String, init_string_literal : Bool = false)
Source

Instance methods

access_modifier
Source
has_setter?
Source
init_string_literal?

True when init_value came from a string_literal node and was therefore already decoded (quotes stripped) on the way in.

Source
init_value
Source
literal_default

The request-ready value of this field's initializer, or "" when the initializer is an expression with no literal form.

init_value cannot be handed to Noir::JvmLiteral.value_of directly, because Kotlin's collector stores mixed shapes: a string_literal is decoded (= "untitled" -> untitled) while every other initializer keeps its raw source (= LocalDateTime.now()). A decoded string is indistinguishable from a bare identifier once stored, so running the literal check over it erased every string default in a Kotlin DTO. The flag is what tells the two apart. Java's collector keeps raw text throughout, which is why its call site passes init_value straight in.

Source
name
Source
null_for_any_group?(groups : Array(String)) : Bool
Source
null_validation_groups
Source
server_managed?
Source
validation_annotations
Source