Detailed explanation of Java annotation template settings such as Eclipse, MyEclipse, and springSTS.

Java template entry:

    Window->Preference->Java->Code Style->Code Template

    Then expand the Comments node is all the elements that need to set comments.

    Now let's introduce each element one by one:

 

File (Files) comment label:

/**  
* @Title::${file_name}
* @Package :${package_name}
* @Description: ${todo}
* @author: 例如(shiziqiu)  
* @date: ${date} ${time}
* @version : 1.0  
*/

Types annotation tags (class annotations):

/**
* @ClassName::${type_name}
* @Description: ${todo}
* @author :例如(shiziqiu) 
* @date :${date} ${time}
*
* ${tags}
*/

Fields annotation label:

/**
* @Fields ${field} : ${todo}
*/
Constructor tag:

/**
* Title:
* Description:
* ${tags}
*/

Method (Constructor & Methods) tags (constructors and method annotations):

/**
* @Title:${enclosing_method}
* @Description:${todo}
* @param :${tags}
* @return :${return_type}
* @throws
*/

Overriding Methods tab:

/* (非 Javadoc)
* <p>Title:${enclosing_method}</p>
* <p>Description: </p>
* ${tags}
* ${see_to_overridden}
*/

Delegate Methods label:

/**
* ${tags}
* ${see_to_target}
*/
getter method tags:

/**
* @return ${bare_field_name}
*/

setter method label:

/**
* @param ${param} ${bare_field_name} to set
*/

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=326296155&siteId=291194637