![JAR search and dependency download from the Maven repository](/logo.png)
templates.java.nested_class.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
{{#schema}}{{#description}} /**
* {{&safeDescription}}
*/
{{/description}}{{/schema}}{{#isObject}} public static class {{&className}}{{>extends_implements}} {
{{#nonBaseProperties}} private final {{>type}} {{&javaName}};
{{#last}}
{{/last}}{{/nonBaseProperties}}{{#numberOfProperties}} public {{&className}}({{#properties}}{{^first}},{{/first}}
{{>type}} {{&javaName}}{{/properties}}
) {
{{#baseClass}}{{#constraints}}{{#properties}}{{#first}} super({{/first}}{{^first}}, {{/first}}{{&javaName}}{{#last}});
{{/last}}{{/properties}}{{/constraints}}{{/baseClass}}{{#nonBaseProperties}}{{^isPrimitive}}{{^nullable}} if ({{&javaName}} == null)
{{>tniae}}("Must not be null - {{&javaName}}");
{{/nullable}}{{/isPrimitive}}{{>validations}} this.{{&javaName}} = {{&javaName}};
{{/nonBaseProperties}} }
{{/numberOfProperties}}{{>getters}}{{>equals}}
{{>hashcode}}
}
{{/isObject}}{{#isString}} public enum {{&className}} {
{{#enumValues}} {{&.}}{{^last}},{{/last}}
{{/enumValues}} }
{{/isString}}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy