![JAR search and dependency download from the Maven repository](/logo.png)
templates.kotlin.add_statics.mustache Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of json-kotlin-schema-codegen Show documentation
Show all versions of json-kotlin-schema-codegen Show documentation
Code generation from JSON Schema to Kotlin or Java
{{#statics}}{{#first}}
companion object {
{{/first}}{{#type}}{{#DECIMAL}} private val {{&staticName}} = {{#value}}{{#isZero}}{{&decimalClass.className}}.ZERO{{/isZero}}{{!
}}{{^isZero}}{{#isOne}}{{&decimalClass.className}}.ONE{{/isOne}}{{!
}}{{^isOne}}{{&decimalClass.className}}("{{&rawNumber}}"){{/isOne}}{{/isZero}}{{/value}}
{{/DECIMAL}}{{#STRING}} private const val {{&staticName}} = {{&value.kotlinString}}
{{/STRING}}{{#PATTERN}} private val {{&staticName}} = Regex({{&value.kotlinString}})
{{/PATTERN}}{{#STRING_ARRAY}} private val {{&staticName}} = setOf(
{{#value}} {{&kotlinString}}{{^last}},{{/last}}
{{/value}} )
{{/STRING_ARRAY}}{{#INT_ARRAY}} private val {{&staticName}} = setOf({{#value}}{{&.}}{{^last}}, {{/last}}{{/value}})
{{/INT_ARRAY}}{{/type}}{{#last}} }
{{/last}}{{/statics}}{{^statics}}{{#companionObjectNeeded}}
companion object
{{/companionObjectNeeded}}{{/statics}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy