templates.includes.generic.include.vm Maven / Gradle / Ivy
#parse("${include}/schema.include.vm")
#parse("${include}/commons.macros.vm")
#set ( $interfaceClass = $sourceinfo.interfaceClass )
#set ( $refClass = $sourceinfo.refClass )
#set ( $defaultGenericTypes=$sourceinfo.defaultGenericTypes)
#macro( genericName $parameter)
#if(!$sourceinfo.getGenericParam($parameter)||$sourceinfo.getGenericParam($parameter).name.empty)$defaultGenericTypes.getName($parameter.type)#else$sourceinfo.getGenericParam($parameter).name()#end
#end
#macro( typeDefine $type)$sourceinfo.getTypeDefine($type)#end
#macro( typeName $type)$sourceinfo.getTypeName($type)#end
#macro( fullTypeName $type)$sourceinfo.getFullTypeName($type)#end
#macro( rawTypeName $type)$sourceinfo.getRawTypeName($type)#end
#macro( defineTypeVariables $method)$sourceinfo.defineTypeVariables($method,false)#end
#macro( fullDefineTypeVariables $method)$sourceinfo.defineTypeVariables($method,true)#end
#macro( paramsDefine $method)$sourceinfo.paramsDefine($method,false)#end
#macro( fullParamsDefine $method)$sourceinfo.paramsDefine($method,true)#end
#macro( pamameterType $parameter)
#if($sourceinfo.needGeneric($parameter))#genericName($parameter)#else#typeName($parameter.genericType)#end
#end
#macro( typeParametersDefine)
#set ( $types=$method.typeParameters )
#set ( $names=$sourceinfo.getGenericNames($method))
#set ( $count=1)
#if( $types.size() > 0 || $names)<#foreach($type in $types)#if( $count > 1 ),#end#typeDefine($type)set($count=$count+1)#end#foreach($name in $names)#if( $count > 1 ),#end$name#set($count=$count+1)#end>#end
#end
#macro (fillThrows $exceptions)
#if( $exceptions.size()>0 )
throws #join($exceptions '#typeName($e)' ',')
#end
#end
#macro( addIntoImports $clazz)$TOOL.addImportedClasses($imports,$clazz)#end
#macro( removeFromImports $clazz)
#set($tmp_removeFromImports=$imports.removeClassFromImports($clazz))
#end
#macro(outputImports )
#outputImports1($sourceinfo.getImportedClassNames($pkg))
#end
#macro(outputImports1 $classNames)
#if(!$inline)
#foreach ($clazzName in $classNames)
import $clazzName;
#end
#end
#end
#macro(RETURN)#if(!$TOOL.isVoid($method.returnType))return#end#end
© 2015 - 2025 Weber Informatics LLC | Privacy Policy