[Suggestion] Override Getter/Setter annotations #1026 - GitHub
文章推薦指數: 80 %
It would be nice if you would implement overriding getter/setter annotations. For example: @Getter public class Example { private int a; ... Skiptocontent {{message}} projectlombok / lombok Public Notifications Fork 2.1k Star 11k Code Issues 713 Pullrequests 11 Actions Wiki Security Insights More Code Issues Pullrequests Actions Wiki Security Insights Newissue Haveaquestionaboutthisproject?SignupforafreeGitHubaccounttoopenanissueandcontactitsmaintainersandthecommunity. Pickausername EmailAddress Password SignupforGitHub Byclicking“SignupforGitHub”,youagreetoourtermsofserviceand privacystatement.We’lloccasionallysendyouaccountrelatedemails. AlreadyonGitHub? Signin toyouraccount Jumptobottom [Suggestion]OverrideGetter/Setterannotations #1026 Closed delverdevopenedthisissue Feb15,2016 ·3comments Closed [Suggestion]OverrideGetter/Setterannotations #1026 delverdevopenedthisissue Feb15,2016 ·3comments Comments Copylink delverdev commented Feb15,2016 Itwouldbeniceifyouwouldimplementoverridinggetter/setterannotations.Forexample: @Getter publicclassExample{ privateinta; publicintgetA(){//overridetoavoidnpe returna<0?-1:a; } } Thetextwasupdatedsuccessfully,buttheseerrorswereencountered: Copylink Contributor Maaartinus commented Feb19,2016 Justdoit.Nogettergetsgeneratedifthere'salreadyonepresent. Youcanalsouse@Getter(AccessLevel.NONE)todisablethegenerationexplicitly. 👍 7 Sorry,somethingwentwrong. Copylink Author delverdev commented Feb20,2016 WellthenitisanissueofIntelliJIDEAplugin,whichwarnsmethatIcannothave@Getterandsimplegettertogether.Thankyoufortheanswer! Sorry,somethingwentwrong. Copylink Contributor Maaartinus commented Feb20,2016 AFAIK,thereshouldbenosuchwarningunlesstheannotationsurelygeneratesnogettersatall(afield-levelannotationtogetherwiththemanualgettershouldproduceawarning;aclass-levelannotationshouldnot). Sorry,somethingwentwrong. Rawi01 closedthis Feb21,2022 Signupforfree tojointhisconversationonGitHub. Alreadyhaveanaccount? Signintocomment Assignees Nooneassigned Labels Noneyet Projects Noneyet Milestone Nomilestone Linkedpullrequests Successfullymergingapullrequestmayclosethisissue. Noneyet 3participants Youcan’tperformthatactionatthistime. Yousignedinwithanothertaborwindow.Reloadtorefreshyoursession. Yousignedoutinanothertaborwindow.Reloadtorefreshyoursession.
延伸文章資訊
- 1How do you override a Lombok getter? - QuickAdviser
You can always manually disable getter/setter generation for any field by using the special Acces...
- 2史上最全面的Lombok 註解介紹,Look 一下吧!
public class GetterSetterExample { @Getter @Setter private int age = 10; @Setter(AccessLevel.PROT...
- 3[Suggestion] Override Getter/Setter annotations #1026 - GitHub
It would be nice if you would implement overriding getter/setter annotations. For example: @Gette...
- 4Omitting Getter or Setter in Lombok | Baeldung
This access level lets us override the behavior of a @Getter, @Setter, or @Data annotation on a c...
- 5Lombok @Getter @Setter and lazy getters examples
This lets you override the behavior of a @Getter , @Setter or @Data annotation on a class. Lobmok...