IDEA-类方法注释

方法模板

** 
 * $params$$return$
 * @author xxx
 * @date $DATE$ $TIME$
 * @version V1.0.0
 **/

参数函数

groovyScript("
	if ("${_1}".length() == 2) {
		return '\n * ';
	} else {
		def result = ''; 
		def params = "${_1}".replaceAll('[\\[|\\]|\\s]', '').split(',').toList();
		for (i = 0; i < params.size(); i++) {
		   result += '\n * @param ' + params[i] + ' ';
		};
		return result;
	}", methodParameters());

返回值函数

groovyScript("
	def returnType = "${_1}"; 
	def result = '* @return ' + returnType; 
	if (returnType != 'void') {
	    return '\n ' + result; 
	}", methodReturnType());

截图

类模板

**
 * 
 * @author xxx
 * @date $DATE$ $TIME$
 * @version V1.0.0
 **/

  

原文地址:https://www.cnblogs.com/BINGJJFLY/p/14215066.html