public QuestionEsIndexBuilder setPaperQuestionList(List<PaperQuestion> paperQuestionList) {
this.paperQuestionList = paperQuestionList;
return this;
}
public QuestionEsIndexBuilder setQuestionKnowledgeList(List<QuestionKnowledge> questionKnowledgeList) {
this.questionKnowledgeList = questionKnowledgeList;
return this;
}
public QuestionEsIndexBuilder setYearList(List<QuestionYear> yearList) {
this.yearList = yearList;
return this;
}
如上述代码,我想替换set方法名为字段名,需要删除set,并将之后的字符变为小写,满足驼峰形式。
可以通过idea的查询替换功能,选中正则,通过 set([/w]) 查询匹配内容,$1代表需要变更小写的字符。replace内容填 \l$1 ,就可以实现。
![操作截图](https://i-blog.csdnimg.cn/blog_migrate/3078befa32c46fa8eb7218be04777e34.png)