vTemplates.ClassTemplate.vm Maven / Gradle / Ivy
#set($classDeclaration = $context.classDeclaration)
package ${classDeclaration.pack};
public interface ${classDeclaration.name} extends org.kevoree.modeling.KObject#foreach($parent in $classDeclaration.parents), $parent.getFqn()#end {
#foreach($attribute in $classDeclaration.attributes)
public $context.generationContext.getHelper().convertToJavaType(${attribute.getType()}) get${context.generationContext.helper.toCamelCase($attribute.getName())}();
public ${classDeclaration.pack}.${classDeclaration.name} set${context.generationContext.helper.toCamelCase($attribute.getName())}($context.generationContext.getHelper().convertToJavaType(${attribute.getType()}) p_obj);
#end
#foreach($rel in $classDeclaration.references)
#if($rel.visible)
#if($rel.single)
public ${classDeclaration.pack}.${classDeclaration.name} set${context.generationContext.helper.toCamelCase($rel.getName())}($rel.getType().fqn p_obj);
public void get${context.generationContext.helper.toCamelCase($rel.getName())}(org.kevoree.modeling.KCallback<${rel.getType().fqn}> cb);
#{else}
public ${classDeclaration.pack}.${classDeclaration.name} add${context.generationContext.helper.toCamelCase($rel.getName())}($rel.getType().fqn p_obj);
public ${classDeclaration.pack}.${classDeclaration.name} remove${context.generationContext.helper.toCamelCase($rel.getName())}($rel.getType().fqn p_obj);
public void get${context.generationContext.helper.toCamelCase($rel.getName())}(org.kevoree.modeling.KCallback<${rel.getType().fqn}[]> cb);
public int sizeOf${context.generationContext.helper.toCamelCase($rel.getName())}();
#end
#end
#end
#foreach($operation in $classDeclaration.operations)
public void ${operation.name}(#foreach($p in $operation.inputParams)$p.type $p.name, #{end}org.kevoree.modeling.KCallback<#if(${operation.returnParam})$operation.returnParam.type#{else}Boolean#end> result);
#end
#if($classDeclaration.isInferred())
#set($i = 0)
public void train(#foreach($dependency in $classDeclaration.dependencies)#if($i!=0), #end${dependency.type.pack}.$dependency.type.name $dependency.name#set($i=$i+1)#end#foreach($output in $classDeclaration.outputs)#if($i!=0), #end${context.generationContext.getHelper().getInstance().convertToJavaType(${output.type})} $output.name#set($i=$i+1)#end#if($i!=0),#end org.kevoree.modeling.KCallback callback);
#set($i = 0)
public void trainAll(#foreach($dependency in $classDeclaration.dependencies)#if($i!=0), #end${dependency.type.pack}.${dependency.type.name}[] ${dependency.name}#set($i=$i+1)#end#foreach($output in $classDeclaration.outputs)#if($i!=0), #end${context.generationContext.getHelper().getInstance().convertToJavaType(${output.type})} $output.name#set($i=$i+1)#end#if($i!=0),#end org.kevoree.modeling.KCallback callback);
#set($i = 0)
public void infer(#foreach($dependency in $classDeclaration.dependencies)#if($i!=0), #end${dependency.type.pack}.$dependency.type.name ${dependency.name}#set($i=$i+1)#end#if($i!=0),#end #if($classDeclaration.multipleOutput())org.kevoree.modeling.KCallback