1
0
mirror of https://github.com/SpaceVim/SpaceVim.git synced 2025-02-03 19:00:06 +08:00
SpaceVim/bundle/vim-javacomplete2/plugin/res/gen__class_interface.tpl
2022-11-02 00:34:34 +08:00

14 lines
522 B
Smarty
Vendored

function! s:__class_interface(class, options)
let result = "package ". a:options.package .";\n\n"
let result .= "public interface ". a:options.name
if has_key(a:options, 'extends')
let result .= " extends ". a:options['extends']
endif
let result .= " {\n"
for fieldKey in keys(get(a:options, 'fields', {}))
let field = a:options['fields'][fieldKey]
let result .= field['mod']. " ". field['type']. " ". field['name']. "();\n"
endfor
return result . "\n}"
endfunction