![JAR search and dependency download from the Maven repository](/logo.png)
templates.java.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}}
{{/first}}{{#type}}{{#PATTERN}} private static final Pattern {{&staticName}} = Pattern.compile({{&value.javaString}});
{{/PATTERN}}{{#STRING}} private static final String {{&staticName}} = {{&value.javaString}};
{{/STRING}}{{#DECIMAL}} private static final BigDecimal {{&staticName}} = {{#value}}{{#isZero}}BigDecimal.ZERO{{/isZero}}{{^isZero}}{{#isOne}}BigDecimal.ONE{{/isOne}}{{^isOne}}new BigDecimal("{{&rawNumber}}"){{/isOne}}{{/isZero}}{{/value}};
{{/DECIMAL}}{{#STRING_ARRAY}} private static final List{{&openAngleBracket}}String> {{&staticName}} = Arrays.asList(
{{#value}} {{&kotlinString}}{{^last}},{{/last}}
{{/value}} );
{{/STRING_ARRAY}}{{#INT_ARRAY}} private static final List{{&openAngleBracket}}Integer> {{&staticName}} = Arrays.asList({{#value}}{{&.}}{{^last}}, {{/last}}{{/value}});
{{/INT_ARRAY}}{{/type}}{{/statics}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy