Created
September 24, 2011 14:37
-
-
Save php-coder/1239390 to your computer and use it in GitHub Desktop.
Lombok usage example
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Getter(AccessLevel.PROTECTED) | |
private int b; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ java -jar lombok-0.10.0.jar delombok -p Example.java | |
// Generated by delombok at Sat Sep 24 17:04:52 NOVST 2011 | |
public class Example { | |
private int a; | |
@java.lang.SuppressWarnings("all") | |
public int getA() { | |
return this.a; | |
} | |
@java.lang.SuppressWarnings("all") | |
public void setA(final int a) { | |
this.a = a; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<dependency> | |
<groupid>org.projectlombok</groupId> | |
<artifactid>lombok</artifactId> | |
<version>0.10.8</version> | |
<scope>provided</scope> | |
</dependency> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.Getter; | |
import lombok.Setter; | |
public class Example { | |
@Getter @Setter | |
private int a; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import lombok.Getter; | |
import lombok.Setter; | |
public class Example { | |
private int a; | |
public int getA() { | |
return this.a; | |
} | |
public void setA(int a) { | |
this.a = a; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment