当前位置:网站首页>@Accessors annotation function specifies that the prefix follows the hump naming
@Accessors annotation function specifies that the prefix follows the hump naming
2022-07-03 03:12:00 【Friendship years】
Accessors Translation is accessor . With this annotation you can control getter and setter The form of the method .
@Accessors(fluent = true)
Use fluent attribute ,getter and setter Method names are property names , And setter Method returns the current object
@Data
@Accessors(fluent = true)
class User {
private Integer id;
private String name;
// Generated getter and setter The method is as follows , Method brief
public Integer id(){}
public User id(Integer id){}
public String name(){}
public User name(String name){}
}
@Accessors(chain = true)
Use chain attribute ,setter Method returns the current object
@Data
@Accessors(chain = true)
class User {
private Integer id;
private String name;
// Generated setter The method is as follows , Method brief
public User setId(Integer id){}
public User setName(String name){}
}
@Accessors(prefix = “f”)
Use prefix attribute ,getter and setter Method ignores the specified prefix of the property name ( Follow the hump name )
@Data
@Accessors(prefix = "f")
class User {
private Integer fId;
private String fName;
// Generated getter and setter The method is as follows , Method brief
public Integer id(){}
public void id(Integer id){}
public String name(){}
public void name(String name){}
}
边栏推荐
- Kubernetes family container housekeeper pod online Q & A?
- MySql實戰45講【SQL查詢和更新執行流程】
- yii2 中andWhere多个or查询 orm条件
- VS 2019 配置tensorRT生成engine
- 从C到Capable-----利用指针作为函数参数求字符串是否为回文字符
- Creation and destruction of function stack frame
- [C language] MD5 encryption for account password
- MySql实战45讲【事务隔离】
- Unity3d RPG implementation (medium)
- 二维数组中的元素求其存储地址
猜你喜欢

I2C 子系统(四):I2C debug

内存泄漏工具VLD安装及使用

分布式事务
![[shutter] monitor the transparency gradient of the scrolling action control component (remove the blank of the top status bar | frame layout component | transparency component | monitor the scrolling](/img/c3/b9a614001f80345a5c1cb3c68ab27c.jpg)
[shutter] monitor the transparency gradient of the scrolling action control component (remove the blank of the top status bar | frame layout component | transparency component | monitor the scrolling

Vs Code configure virtual environment

Joking about Domain Driven Design (III) -- Dilemma

MySql实战45讲【事务隔离】

Creation and destruction of function stack frame

Kubernetes cluster log and efk architecture log scheme

I2C subsystem (II): I3C spec
随机推荐
TCP handshake three times and wave four times. Why does TCP need handshake three times and wave four times? TCP connection establishes a failure processing mechanism
[pyg] understand the messagepassing process, GCN demo details
The file marked by labelme is converted to yolov5 format
Source code analysis | resource loading resources
PHP constructor with parameters - PHP constructor with a parameter
How to make backgroundworker return an object
[Chongqing Guangdong education] cultural and natural heritage reference materials of China University of Geosciences (Wuhan)
Basic information of Promethus (I)
The base value is too large (the error is marked as "08") [duplicate] - value too great for base (error token is'08') [duplicate]
About HTTP cache control
Creation and destruction of function stack frame
The process of connecting MySQL with docker
Change cell color in Excel using C - cell color changing in Excel using C
Three. JS local environment setup
3D drawing example
Can I use read-only to automatically implement properties- Is read-only auto-implemented property possible?
@Accessors注解作用指定前缀遵守驼峰命名
docker安装redis
VS 2019 配置tensorRT生成engine
The XML file generated by labelimg is converted to VOC format