Java annotation format setting in myeclipse, myeclipsejava

Source: Internet
Author: User

Java annotation format setting in myeclipse, myeclipsejava

Eclipse annotation specification template Summary

I. Specific operations

(1) In eclipse, open Window> Preference> Java> Code Style> Code Template

(2) then expand the Comments node, which is all the elements for which you need to set Comments. Follow the instructions below to set Comments.

Ii. annotation specifications

1. File annotation label

/** * FileName:         ${file_name} * @Description:     ${todo} * @author:            crane-yuan * @version            V1.0 * Createdate:      ${date}     ${time} * Copyright:        Copyright(C) 2016-2017 * Company           CY. * All rights Reserved, Designed By crane-yuan * Modification  History: * Date         Author        Version        Discription * --------------------------------------------------------------------------- * ${date}     crane-yuan       1.0             1.0 * Why & What is modified: */


2. Type (Types) annotation label (class annotation ):

/** * @ClassName:       ${type_name} * @Description:    ${todo} * @author:            crane-yuan * @date:            ${date}        ${time} */

 
3. Field (Fields) annotation label:

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


4. Constructor annotation labels:

/** * @Title:            ${enclosing_type} * @Description:    ${todo} * @param:            ${tags} * @throws */ 


5. Method labels:

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

 
6. Overriding Methods labels:

/** * <p>Title: ${enclosing_method}</p> * <p>Description: </p> * ${tags} * ${see_to_overridden} */ 

 
7. Delegate Methods label:

/** * ${tags} * ${see_to_target} */


8. getter method label:

/** * @Title:            ${enclosing_method} <BR> * @Description:      ${todo} <BR> * @return:         ${field_type} <BR> */ 

 
9. setter method label:

/** * @Title:          ${enclosing_method} <BR> * @Description:     ${todo} <BR> * @return:         ${field_type} <BR> */  

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.