struct
Noir::TreeSitterKotlinParameterExtractor::FieldInfo
- Noir::TreeSitterKotlinParameterExtractor::FieldInfo
- Struct
- Value
- Object
Defined in:
miniparsers/kotlin_parameter_extractor_ts.crConstructors
Instance Method Summary
- #access_modifier : String
- #has_setter? : Bool
-
#init_string_literal? : Bool
True when
#init_valuecame from astring_literalnode and was therefore already decoded (quotes stripped) on the way in. - #init_value : String
-
#literal_default : String
The request-ready value of this field's initializer, or "" when the initializer is an expression with no literal form.
- #name : String
- #null_for_any_group?(groups : Array(String)) : Bool
- #null_validation_groups : Array(String)
- #server_managed? : Bool
- #validation_annotations : Array(String)
Constructor Detail
Instance Method Detail
True when #init_value came from a string_literal node and was
therefore already decoded (quotes stripped) on the way in.
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.