idea 注释 自动 return param
程序员文章站
2022-06-13 16:40:07
...
groovyScript("
def result='';
def params=\"${_1}\".replaceAll('[\\\\[|\\\\]|\\\\s]', '').split(',').toList();
for(i = 0; i < params.size(); i++) {
if(params[i] == '')
return result;
if(i==0)
result += '\\n';
result+=' * @param ' + params[i] + ((i < params.size() - 1) ? '\\n' : '')};
return result", methodParameters())
groovyScript("
def returnType = \"${_1}\";
def result = returnType;
return result;", methodReturnType());