Stable - Project Lombok

文章推薦指數: 80 %
投票人數:10人

Running delombok. Delombok copies your source files to another directory, replacing all lombok annotations with their desugared form. So, it'll turn @Getter ... ProjectLombok Features Stable Experimental Community Discuss/Help Issues Documentationforcontributors ContacttheteambehindProjectLombok Order/Donate Howtouse Install Javac ECJ maven gradle ant kobalt Eclipse IntelliJIDEA Netbeans MyEclipse SpringToolSuite JBossDeveloperStudio VisualStudioCode Android GWT Download GetLombokforEnterprise Lombokfeatures TheLombokjavadocisavailable,butweadvisethesepages. val Finally!Hassle-freefinallocalvariables. var Mutably!Hassle-freelocalvariables. @NonNull or:HowIlearnedtostopworryingandlovetheNullPointerException. @Cleanup Automaticresourcemanagement:Callyourclose()methodssafelywithnohassle. @Getter/@Setter NeverwritepublicintgetFoo(){returnfoo;}again. @ToString Noneedtostartadebuggertoseeyourfields:JustletlombokgenerateatoStringfor you! @EqualsAndHashCode Equalitymadeeasy:GenerateshashCodeandequalsimplementationsfromthe fieldsofyourobject.. @NoArgsConstructor,@RequiredArgsConstructorand@AllArgsConstructor Constructorsmadetoorder:Generatesconstructorsthattakenoarguments,oneargumentperfinal/ non-nullfield,oroneargumentforeveryfield. @Data Alltogethernow:Ashortcutfor@ToString,@EqualsAndHashCode, @Getteronallfields,and@Setteronallnon-finalfields,and @RequiredArgsConstructor! @Value Immutableclassesmadeveryeasy. @Builder ...andBob'syouruncle:No-hasslefancy-pantsAPIsforobjectcreation! @SneakyThrows Toboldlythrowcheckedexceptionswherenoonehasthrownthembefore! @Synchronized synchronizeddoneright:Don'texposeyourlocks. @With Immutable'setters'-methodsthatcreateaclonebutwithonechangedfield. @Getter(lazy=true) Lazinessisavirtue! @Log Captain'sLog,stardate24435.7:"Whatwasthatlineagain?" experimental Headtothelab:Thenewstuffwe'reworkingon. Configurationsystem Lombok,madetoorder:Configurelombokfeaturesinoneplaceforyourentireprojectorevenyourworkspace. Runningdelombok Delombokcopiesyoursourcefilestoanotherdirectory,replacingalllombokannotationswiththeirdesugaredform.So,it'llturn@Getterbackintotheactualgetter.Itthenremovestheannotation.Thisisusefulforallsortsofreasons;youcancheckoutwhat'shappeningunderthehood,iftheunthinkablehappensandyouwanttostopusinglombok,youcaneasilyremovealltracesofitinyoursource,andyoucanusedelomboktopreprocessyoursourcefilesforsource-leveltoolssuchasjavadocandGWT.Moreinformationabouthowtorundelombok,includinginstructionsforbuildtoolscanbefoundatthedelombokpage.



請為這篇文章評分?