In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "the configuration of IDEA annotation template". The content of the explanation is simple and clear, and it is easy to learn and understand. Please follow the editor's train of thought to study and learn "the configuration of IDEA annotation template".
IDEA comment setting 1, comment setting 1. Step 1: set up File and Code Templates
/ * usage description * * @ company XXXX Technology Co., Ltd. * @ author your name * @ date ${YEAR} year ${MONTH} month ${DAY} day ${TIME} your name Exp $* @ version $Id: ${NAME}, v0.1 * / 2. Step 2: set up Live Templates
Live Templates's comment can be set to annotate shortcuts, which can be quickly supplemented using the value of / * + Abbreviation + Tab.
/ * function description * $parem$* @ return$ return$* @ author your name * @ version 1.0 * @ date$ date$*/$END$
Use the / * * m+Tab key to quickly supplement
Note $parem$ setting: groovyScript ("def result=''; def params=\" ${1}\ ".replaceAll ('[[\ [|\] |\ s]','). Split (','). ToList (); for (I = 0; I < params.size (); for +) {result+='* @ param'+ params [I] + ((I < params.size ()-1)?'\ n':'')}} If (as a result) {return result.substring (2);} else return''; ", methodParameters ()
Attribute description * / $END$
2. VO entity class fields Get, Set comments the first step: create Get step
Right-click and select Generate …
Open the Getter Template window and click + in the upper left corner to add a template.
Add the following content to the template:
/ * Getter method for property $field.name.** @ return property value of $field.name*/#if ($field.modifierStatic) static # end$field.type # # set ($name = $StringUtil.capitalizeWithJavaBeanConvention ($StringUtil.sanitizeJavaIdentifier ($field ($field, $project) # if ($field.boolean & & $field.primitive) is###elseget###end$ {name} () {return $field.name;} second step setup Setter
Open the Setter Template window
Add the following content to the template:
/ * Setter method for property $field.name.** @ param $field.name value to be assigned to property $field.name*/#set ($paramName = $helper.getParamName ($field, $project) # if ($field.modifierStatic) static # endvoid set$StringUtil.capitalizeWithJavaBeanConvention ($StringUtil.sanitizeJavaIdentifier ($helper.getPropertyName ($field, $project)) ($field.type $paramName) {# if ($field.name = = $paramName) # if (! $field.modifierStatic) this.## # else $classname.## # end#end$field.name = $paramName } final result
Thank you for your reading, the above is the content of "the configuration of IDEA annotation template", after the study of this article, I believe you have a deeper understanding of the configuration of IDEA annotation template, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.