当前位置:网站首页>Lombok comments @accessories
Lombok comments @accessories
2022-07-22 07:57:00 【The fruit of it midsummer】
Catalog
1 Preface
When you look at the code, you may find such an annotation written on the entity class @Accessors, So what does it mean , And what effect does it have ?
2 To explore the
Click into the annotation to see what you find , The annotation has 3 Attributes :fluent、chain、prefix
package lombok.experimental;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
@Target({ElementType.TYPE, ElementType.FIELD})
@Retention(RetentionPolicy.SOURCE)
public @interface Accessors {
boolean fluent() default false;
boolean chain() default false;
String[] prefix() default {};
}
2.1 Attribute specification
1)fluent attribute
Do not write default is false, When the value is true when , Corresponding to getter There is no method in front of get,setter There would be no way set.
2)chain attribute
Do not write default is false, When the value is true when , Corresponding to setter After method call , The current object will be returned .
3)prefix attribute
This property is an array of strings , When the array has a value , Indicates that the corresponding prefix in the field is ignored , Generate corresponding getter and setter Method .
Reference resources :@Accessors Annotations, _zyqok The blog of -CSDN Blog [email protected]
边栏推荐
- Dynamics 365: explain the execution depth of plug-ins (pluginexecutioncontext.depth)
- MySQL sub database and sub table and its smooth expansion scheme
- Dynamics crm: xrmtoolbox plug-in recommendation
- 单片机入门:点亮多个LED灯
- 【二叉树】验证二叉树
- 【解决】UnityWebRequest 下请求 EXCEL数据 返回 PK 结果的解决方案
- Introduction to single chip microcomputer: light up multiple LED lights
- Dynamics CRM: several situations in which the display fields in a form become read-only
- ROS机械臂 Movelt 学习笔记1 | 基础准备
- Front line engineers tell you the real status and development prospects of embedded "suggestions collection"
猜你喜欢
Use the C console program to read the messages in the azure service bus queue
Wechat side: what is consistent hash, usage scenarios, and what problems have been solved?
Dynamics CRM: several situations in which the display fields in a form become read-only
The pit trodden by real people tells you to avoid the 10 mistakes that novices in automated testing often make
Dynamics 365: several plug-ins for creating Er (entity relationship) diagrams in xrmtoolbox are recommended
指针在数组对象中的基本使用与地址探讨
你离「TDengine 开发者大会」只差一条 SQL 语句!
Dynamics 365: how to create users in azure AD and add them to dynamics 365 Online
Leetcode 1288. 删除被覆盖区间(可以,已解决)
tsconfig.json在配置文件中找不到任何输入,怎么办?
随机推荐
mysql 使用命令行导入数据
单片机入门:LED灯循环左移点亮
单片机入门:点亮第一个LED小灯
Wechat applet realizes the functions of ID card photographing and cutting
15. 谈谈这几个常见的多线程面试题
电脑上如何开启多个微信,微信多开
数据库学习 – select(多表联查)[通俗易懂]
Dynamics crm: add process sessions to the navigation of the form to view the running history of the workflow
tsconfig.json在配置文件中找不到任何输入,怎么办?
Free sharing, easy to use Bates training method to mediate ciliary myopic recovery training
Dynamics CRM: 遇到“The plug-in execution failed because no Sandbox Hosts are currently available.“
Azure key vault (3): the difference between key and secret
MLX90640 红外热成像仪测温模块开发笔记(三)
The sharp weapon of web automation -- curl
Unity SKFramework框架(一)、Audio音频管理器
tsconfig. JSON cannot find any input in the configuration file. What should I do?
【案例设计】事件分发器 — 实现跨类的事件响应思路分享与实现
Dynamics CRM:表单中移除一个控件时,提示“The field you are trying to remove is required by the system or business“
Information sharing of programming learning
What are the common exceptions?