Lombok generic builder
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.Builder; | |
import lombok.Data; | |
@Data | |
@Builder | |
public class Entity<T> { | |
private T body; | |
public static void main(String[] args) { | |
//Line 11 does not compile | |
Entity<Integer> entity = Entity.<Integer>builder().body(1).build(); | |
System.out.println(entity.getBody()); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment