lombok

풀그림 2013. 11. 26. 20:00


Lombok features overview

val
Finally! Hassle-free final local variables.
@NonNull
or: How I learned to stop worrying and love the NullPointerException.
@Cleanup
Automatic resource management: Call your close() methods safely with no hassle.
@Getter / @Setter
Never write public int getFoo() {return foo;} again.
@ToString
No need to start a debugger to see your fields: Just let lombok generate a toString for you!
@EqualsAndHashCode
Equality made easy: Generates hashCode and equals implementations from the fields of your object.
@NoArgsConstructor@RequiredArgsConstructor and @AllArgsConstructor
Constructors made to order: Generates constructors that take no arguments, one argument per final / non-null field, or one argument for every field.
@Data
All together now: A shortcut for @ToString@EqualsAndHashCode@Getter on all fields, and @Setter on all non-final fields, and@RequiredArgsConstructor!
@Value
Immutable classes made very easy.
@SneakyThrows
To boldly throw checked exceptions where no one has thrown them before!
@Synchronized
synchronized done right: Don't expose your locks.
@Getter(lazy=true)
Laziness is a virtue!
@Log
Captain's Log, stardate 24435.7: "What was that line again?"
@Delegate
Don't lose your composition.
experimental features
Here be dragons: Extra features which aren't quite ready for prime time yet.



References

1.     Lombok site : http://projectlombok.org/

2.     Lombok features : http://projectlombok.org/features/index.html

3.     Lombok annotion 설명 : http://jnb.ociweb.com/jnb/jnbJan2010.html

4.     Project Lombok - http://projectlombok.org

5.     Lombok API Documentation - http://projectlombok.org/api/index.html

6.     Project Lombok Issues List - http://code.google.com/p/projectlombok/issues/list

7.     Use Lombok via Maven - http://projectlombok.org/mavenrepo/index.html

8.     Project Lombok Google Group - http://groups.google.com/group/project-lombok

9.     Reviewing Project Lombok or the Right Way to Write a Library - http://www.cforcoding.com/2009/11/reviewing-project-lombok-or-right-way.html

10.   Morbok: Extensions for Lombok - http://code.google.com/p/morbok

11.   Using Project Lombok with JDeveloper - http://kingsfleet.blogspot.com/2009/09/project-lombok-interesting-bean.html


Posted by 파이팅야
,