All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.legstar.base.generator.java.class.hbs Maven / Gradle / Ivy

{{#if target_package_name}}package {{target_package_name}};{{/if}}

import java.util.LinkedHashMap;
import java.util.Map;

import com.legstar.base.type.CobolType;
import com.legstar.base.type.composite.*;
import com.legstar.base.type.primitive.*;

public class {{class_name}} extends CobolComplexType {

    public {{class_name}}() {
        super(new CobolComplexType.Builder()
                    .name("{{root_type_name}}")
                    .fields(create{{root_type_name}}Fields())
              );
    }
{{#each complex_types}}
    private static Map < String, CobolType > create{{@key}}Fields() {

        Map < String, CobolType > fields = new LinkedHashMap < String, CobolType >();
{{#each this ~}}
{{> com/legstar/base/generator/java.field}}
{{~/each}}{{!-- this: fields in complex type --}}
        return fields;

    }
{{/each}}{{!-- complex_types --}}
{{~#each choice_types}}
    private static Map < String, CobolType > create{{@key}}Fields() {

        Map < String, CobolType > fields = new LinkedHashMap < String, CobolType >();
{{#each this ~}}
{{> com/legstar/base/generator/java.field}}
{{~/each}}{{!-- this: fields in choice type --}}
        return fields;

    }
{{/each}}{{!-- choice_types --}}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy