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

odeling.org.kevoree.modeling.kotlin.generator.1.4.2.source-code.DefaultFactory.vm Maven / Gradle / Ivy

There is a newer version: 3.5.12
Show newest version
#* @vtlvariable name="packageName" type="java.lang.String" *#
#* @vtlvariable name="formatedFactoryName" type="java.lang.String" *#
#* @vtlvariable name="modelVersion" type="java.lang.String" *#
#* @vtlvariable name="js" type="java.lang.Boolean" *#
#* @vtlvariable name="classes" type="java.util.List" *#
#* @vtlvariable name="ctx" type="org.kevoree.modeling.kotlin.generator.GenerationContext" *#

package ${packageName}.impl;

import ${packageName}.${formatedFactoryName};
#foreach( $class in $classes )
import ${packageName}.${class.getName()};
#end

#if(!$js)open#end class Default${formatedFactoryName} : ${formatedFactoryName} {

override fun getVersion() : String { return "${modelVersion}" }

#foreach( $class in $classes )
override fun create${class.getName()}() : ${class.getName()} { return ${class.getName()}Impl() }
#end

override fun create(metaClassName : String) : ${ctx.getKevoreeContainer().get()}? {
      when(metaClassName){
#foreach( $class in $classes )
                "${packageName}.${class.getName()}" -> { return create${class.getName()}() }
                "${class.getName()}" -> { return create${class.getName()}() }

#end            else -> {return null;}
       }
}


}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy