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

vTemplates.MetaEnumTemplate.vm Maven / Gradle / Ivy

package ${context.pack}.meta;

public class Meta${context.getName()} extends org.kevoree.modeling.meta.impl.MetaEnum implements org.kevoree.modeling.KType {

#set($i = 0)
#foreach($enumAtt in ${context.litterals})
public static final ${context.pack}.${context.getName()} $enumAtt.toUpperCase() = new ${context.pack}.impl.${context.getName()}Literal("$enumAtt.toUpperCase()",$i,"${context.getFqn()}");
    #set($i = $i +1)
#end

    private static Meta${context.getName()} INSTANCE;
    public static Meta${context.getName()} getInstance() {
        if(INSTANCE == null) {
            INSTANCE = new Meta${context.getName()}();
        }
        return INSTANCE;
    }

    public Meta${context.getName()}() {
        super("${context.getFqn()}", ${context.index});
        org.kevoree.modeling.meta.KLiteral[] p_lits_arr = new org.kevoree.modeling.meta.KLiteral[${context.litterals.size()}];
        #set($i = 0)
        #foreach($enumAtt in ${context.litterals}) p_lits_arr[$i] = $enumAtt.toUpperCase(); #set($i = $i +1) #end
        init(p_lits_arr);
    }





}

#* @vtlvariable name="context" type="org.kevoree.modeling.ast.MModelEnum" *#




© 2015 - 2024 Weber Informatics LLC | Privacy Policy