Lombok @SuperBuilder example with json annotations
up vote
8
down vote
favorite
can someone please provide me a working example with the lombok @SuperBuilder experimental annotation?
I can't get it running and there is no code example as documentation available.
Currently my code looks like this:
Superclass:
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class),
@JsonSubTypes.Type(value = AnotherSub.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public abstract class AbstractA
@JsonProperty
protected final String superProperty;
And the subclass:
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilder.class) // class not found?
@JsonTypeName("SubA")
public class SubA extends AbstractA
@JsonProperty
private final String fieldA;
Thanks
java lombok
add a comment |
up vote
8
down vote
favorite
can someone please provide me a working example with the lombok @SuperBuilder experimental annotation?
I can't get it running and there is no code example as documentation available.
Currently my code looks like this:
Superclass:
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class),
@JsonSubTypes.Type(value = AnotherSub.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public abstract class AbstractA
@JsonProperty
protected final String superProperty;
And the subclass:
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilder.class) // class not found?
@JsonTypeName("SubA")
public class SubA extends AbstractA
@JsonProperty
private final String fieldA;
Thanks
java lombok
add a comment |
up vote
8
down vote
favorite
up vote
8
down vote
favorite
can someone please provide me a working example with the lombok @SuperBuilder experimental annotation?
I can't get it running and there is no code example as documentation available.
Currently my code looks like this:
Superclass:
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class),
@JsonSubTypes.Type(value = AnotherSub.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public abstract class AbstractA
@JsonProperty
protected final String superProperty;
And the subclass:
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilder.class) // class not found?
@JsonTypeName("SubA")
public class SubA extends AbstractA
@JsonProperty
private final String fieldA;
Thanks
java lombok
can someone please provide me a working example with the lombok @SuperBuilder experimental annotation?
I can't get it running and there is no code example as documentation available.
Currently my code looks like this:
Superclass:
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class),
@JsonSubTypes.Type(value = AnotherSub.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public abstract class AbstractA
@JsonProperty
protected final String superProperty;
And the subclass:
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilder.class) // class not found?
@JsonTypeName("SubA")
public class SubA extends AbstractA
@JsonProperty
private final String fieldA;
Thanks
java lombok
java lombok
asked Oct 10 at 6:45
Sebastian Thees
11316
11316
add a comment |
add a comment |
2 Answers
2
active
oldest
votes
up vote
2
down vote
accepted
A working solution in Eclipse, note that the Lombok IntelliJ integration is not supporting all features, therefore the code compiles fine in Eclipse and with javac but IntelliJ thinks it's broken but executes the code without an issue.
public static ObjectMapper createObjectMapper()
final ObjectMapper mapper = new ObjectMapper();
mapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector()
@Override
public JsonPOJOBuilder.Value findPOJOBuilderConfig(final AnnotatedClass ac)
if (ac.hasAnnotation(JsonPOJOBuilder.class))
return super.findPOJOBuilderConfig(ac);
return new JsonPOJOBuilder.Value("build", "");
);
return mapper;
public static void main(final String args) throws Exception
final ObjectMapper objectMapper = createObjectMapper();
final String serializedForm = objectMapper.writeValueAsString(SubA.builder().build());
System.out.println(serializedForm);
final SubA anA = objectMapper.readValue(serializedForm, SubA.class);
System.out.println(anA);
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
@JsonTypeName("SubA")
public static class SubA extends AbstractA
@JsonProperty
private final String fieldA;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public static abstract class AbstractA
@JsonProperty
protected final String superProperty;
I think you are right, the IntelliJ plugin has problems generating the code with the annotation. Interesting solution with the JsonPOJOBuilder. All in all, I'll use a different approach than SuperBuilder now. Thanks alot.
– Sebastian Thees
Oct 10 at 11:53
add a comment |
up vote
5
down vote
Updated 2018-11-10: Lombok 1.18.4 released
For Lombok's @Builder and @SuperBuilder to work with Jackson, you have to add the builder class header manually and place a @JsonPOJOBuilder(withPrefix="") on it. Lombok will then generate only the remainder of the builder class. This is necessary because Jackson's default is that the builder's setter methods have "with" as prefix, but Lombok's builders don't have any prefix (and Lombok is not and will probably never be configurable in this regard).
When @SuperBuilder was introduced in Lombok 1.18.2, it was not customizable (i.e., you could not manually add the builder class header). As a result, using @SuperBuilder with Jackson was not easily possible.
This changed with Lombok 1.18.4 (see this pull request): @SuperBuilder is now (at least partially) customizable, and this allows us to add the annotation. Beware that the code generated by @SuperBuilder is quite complex and heavily loaded with generics. To avoid accidentally messing up the code, you should have a look at the delombok output and copy/paste the class header from there. Here, you need add the builder implementation class header and put the annotation on it:
@JsonPOJOBuilder(withPrefix="")
static final class SubABuilderImpl extends SubABuilder<SubA, SubABuilderImpl>
Note that you have to broaden the visibility of SubABuilderImpl to at least package-private.
The @JsonDeserialize annotation must also refer to the builder implementation class, not the abstract builder:
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
So as a result, you say that using the @SuperBuilder is currently not possible?
– Sebastian Thees
Oct 10 at 7:58
1
It is usable, only that it cannot be used for deserialization with Jackson.
– Jan Rieke
Oct 10 at 8:11
Lombok 1.18.4 has been released, allowing customized@SuperBuilders now. I update my answer with a working solution.
– Jan Rieke
Nov 10 at 17:45
add a comment |
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
2
down vote
accepted
A working solution in Eclipse, note that the Lombok IntelliJ integration is not supporting all features, therefore the code compiles fine in Eclipse and with javac but IntelliJ thinks it's broken but executes the code without an issue.
public static ObjectMapper createObjectMapper()
final ObjectMapper mapper = new ObjectMapper();
mapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector()
@Override
public JsonPOJOBuilder.Value findPOJOBuilderConfig(final AnnotatedClass ac)
if (ac.hasAnnotation(JsonPOJOBuilder.class))
return super.findPOJOBuilderConfig(ac);
return new JsonPOJOBuilder.Value("build", "");
);
return mapper;
public static void main(final String args) throws Exception
final ObjectMapper objectMapper = createObjectMapper();
final String serializedForm = objectMapper.writeValueAsString(SubA.builder().build());
System.out.println(serializedForm);
final SubA anA = objectMapper.readValue(serializedForm, SubA.class);
System.out.println(anA);
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
@JsonTypeName("SubA")
public static class SubA extends AbstractA
@JsonProperty
private final String fieldA;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public static abstract class AbstractA
@JsonProperty
protected final String superProperty;
I think you are right, the IntelliJ plugin has problems generating the code with the annotation. Interesting solution with the JsonPOJOBuilder. All in all, I'll use a different approach than SuperBuilder now. Thanks alot.
– Sebastian Thees
Oct 10 at 11:53
add a comment |
up vote
2
down vote
accepted
A working solution in Eclipse, note that the Lombok IntelliJ integration is not supporting all features, therefore the code compiles fine in Eclipse and with javac but IntelliJ thinks it's broken but executes the code without an issue.
public static ObjectMapper createObjectMapper()
final ObjectMapper mapper = new ObjectMapper();
mapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector()
@Override
public JsonPOJOBuilder.Value findPOJOBuilderConfig(final AnnotatedClass ac)
if (ac.hasAnnotation(JsonPOJOBuilder.class))
return super.findPOJOBuilderConfig(ac);
return new JsonPOJOBuilder.Value("build", "");
);
return mapper;
public static void main(final String args) throws Exception
final ObjectMapper objectMapper = createObjectMapper();
final String serializedForm = objectMapper.writeValueAsString(SubA.builder().build());
System.out.println(serializedForm);
final SubA anA = objectMapper.readValue(serializedForm, SubA.class);
System.out.println(anA);
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
@JsonTypeName("SubA")
public static class SubA extends AbstractA
@JsonProperty
private final String fieldA;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public static abstract class AbstractA
@JsonProperty
protected final String superProperty;
I think you are right, the IntelliJ plugin has problems generating the code with the annotation. Interesting solution with the JsonPOJOBuilder. All in all, I'll use a different approach than SuperBuilder now. Thanks alot.
– Sebastian Thees
Oct 10 at 11:53
add a comment |
up vote
2
down vote
accepted
up vote
2
down vote
accepted
A working solution in Eclipse, note that the Lombok IntelliJ integration is not supporting all features, therefore the code compiles fine in Eclipse and with javac but IntelliJ thinks it's broken but executes the code without an issue.
public static ObjectMapper createObjectMapper()
final ObjectMapper mapper = new ObjectMapper();
mapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector()
@Override
public JsonPOJOBuilder.Value findPOJOBuilderConfig(final AnnotatedClass ac)
if (ac.hasAnnotation(JsonPOJOBuilder.class))
return super.findPOJOBuilderConfig(ac);
return new JsonPOJOBuilder.Value("build", "");
);
return mapper;
public static void main(final String args) throws Exception
final ObjectMapper objectMapper = createObjectMapper();
final String serializedForm = objectMapper.writeValueAsString(SubA.builder().build());
System.out.println(serializedForm);
final SubA anA = objectMapper.readValue(serializedForm, SubA.class);
System.out.println(anA);
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
@JsonTypeName("SubA")
public static class SubA extends AbstractA
@JsonProperty
private final String fieldA;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public static abstract class AbstractA
@JsonProperty
protected final String superProperty;
A working solution in Eclipse, note that the Lombok IntelliJ integration is not supporting all features, therefore the code compiles fine in Eclipse and with javac but IntelliJ thinks it's broken but executes the code without an issue.
public static ObjectMapper createObjectMapper()
final ObjectMapper mapper = new ObjectMapper();
mapper.setAnnotationIntrospector(new JacksonAnnotationIntrospector()
@Override
public JsonPOJOBuilder.Value findPOJOBuilderConfig(final AnnotatedClass ac)
if (ac.hasAnnotation(JsonPOJOBuilder.class))
return super.findPOJOBuilderConfig(ac);
return new JsonPOJOBuilder.Value("build", "");
);
return mapper;
public static void main(final String args) throws Exception
final ObjectMapper objectMapper = createObjectMapper();
final String serializedForm = objectMapper.writeValueAsString(SubA.builder().build());
System.out.println(serializedForm);
final SubA anA = objectMapper.readValue(serializedForm, SubA.class);
System.out.println(anA);
@Getter
@EqualsAndHashCode(callSuper = true)
@Accessors(fluent = true, chain = true)
@SuperBuilder
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
@JsonTypeName("SubA")
public static class SubA extends AbstractA
@JsonProperty
private final String fieldA;
@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, property = "type")
@JsonSubTypes(
@JsonSubTypes.Type(value = SubA.class)
)
@Getter
@Accessors(fluent = true, chain = true)
@SuperBuilder
public static abstract class AbstractA
@JsonProperty
protected final String superProperty;
edited Oct 10 at 11:34
answered Oct 10 at 11:29
Andreas
3,7952134
3,7952134
I think you are right, the IntelliJ plugin has problems generating the code with the annotation. Interesting solution with the JsonPOJOBuilder. All in all, I'll use a different approach than SuperBuilder now. Thanks alot.
– Sebastian Thees
Oct 10 at 11:53
add a comment |
I think you are right, the IntelliJ plugin has problems generating the code with the annotation. Interesting solution with the JsonPOJOBuilder. All in all, I'll use a different approach than SuperBuilder now. Thanks alot.
– Sebastian Thees
Oct 10 at 11:53
I think you are right, the IntelliJ plugin has problems generating the code with the annotation. Interesting solution with the JsonPOJOBuilder. All in all, I'll use a different approach than SuperBuilder now. Thanks alot.
– Sebastian Thees
Oct 10 at 11:53
I think you are right, the IntelliJ plugin has problems generating the code with the annotation. Interesting solution with the JsonPOJOBuilder. All in all, I'll use a different approach than SuperBuilder now. Thanks alot.
– Sebastian Thees
Oct 10 at 11:53
add a comment |
up vote
5
down vote
Updated 2018-11-10: Lombok 1.18.4 released
For Lombok's @Builder and @SuperBuilder to work with Jackson, you have to add the builder class header manually and place a @JsonPOJOBuilder(withPrefix="") on it. Lombok will then generate only the remainder of the builder class. This is necessary because Jackson's default is that the builder's setter methods have "with" as prefix, but Lombok's builders don't have any prefix (and Lombok is not and will probably never be configurable in this regard).
When @SuperBuilder was introduced in Lombok 1.18.2, it was not customizable (i.e., you could not manually add the builder class header). As a result, using @SuperBuilder with Jackson was not easily possible.
This changed with Lombok 1.18.4 (see this pull request): @SuperBuilder is now (at least partially) customizable, and this allows us to add the annotation. Beware that the code generated by @SuperBuilder is quite complex and heavily loaded with generics. To avoid accidentally messing up the code, you should have a look at the delombok output and copy/paste the class header from there. Here, you need add the builder implementation class header and put the annotation on it:
@JsonPOJOBuilder(withPrefix="")
static final class SubABuilderImpl extends SubABuilder<SubA, SubABuilderImpl>
Note that you have to broaden the visibility of SubABuilderImpl to at least package-private.
The @JsonDeserialize annotation must also refer to the builder implementation class, not the abstract builder:
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
So as a result, you say that using the @SuperBuilder is currently not possible?
– Sebastian Thees
Oct 10 at 7:58
1
It is usable, only that it cannot be used for deserialization with Jackson.
– Jan Rieke
Oct 10 at 8:11
Lombok 1.18.4 has been released, allowing customized@SuperBuilders now. I update my answer with a working solution.
– Jan Rieke
Nov 10 at 17:45
add a comment |
up vote
5
down vote
Updated 2018-11-10: Lombok 1.18.4 released
For Lombok's @Builder and @SuperBuilder to work with Jackson, you have to add the builder class header manually and place a @JsonPOJOBuilder(withPrefix="") on it. Lombok will then generate only the remainder of the builder class. This is necessary because Jackson's default is that the builder's setter methods have "with" as prefix, but Lombok's builders don't have any prefix (and Lombok is not and will probably never be configurable in this regard).
When @SuperBuilder was introduced in Lombok 1.18.2, it was not customizable (i.e., you could not manually add the builder class header). As a result, using @SuperBuilder with Jackson was not easily possible.
This changed with Lombok 1.18.4 (see this pull request): @SuperBuilder is now (at least partially) customizable, and this allows us to add the annotation. Beware that the code generated by @SuperBuilder is quite complex and heavily loaded with generics. To avoid accidentally messing up the code, you should have a look at the delombok output and copy/paste the class header from there. Here, you need add the builder implementation class header and put the annotation on it:
@JsonPOJOBuilder(withPrefix="")
static final class SubABuilderImpl extends SubABuilder<SubA, SubABuilderImpl>
Note that you have to broaden the visibility of SubABuilderImpl to at least package-private.
The @JsonDeserialize annotation must also refer to the builder implementation class, not the abstract builder:
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
So as a result, you say that using the @SuperBuilder is currently not possible?
– Sebastian Thees
Oct 10 at 7:58
1
It is usable, only that it cannot be used for deserialization with Jackson.
– Jan Rieke
Oct 10 at 8:11
Lombok 1.18.4 has been released, allowing customized@SuperBuilders now. I update my answer with a working solution.
– Jan Rieke
Nov 10 at 17:45
add a comment |
up vote
5
down vote
up vote
5
down vote
Updated 2018-11-10: Lombok 1.18.4 released
For Lombok's @Builder and @SuperBuilder to work with Jackson, you have to add the builder class header manually and place a @JsonPOJOBuilder(withPrefix="") on it. Lombok will then generate only the remainder of the builder class. This is necessary because Jackson's default is that the builder's setter methods have "with" as prefix, but Lombok's builders don't have any prefix (and Lombok is not and will probably never be configurable in this regard).
When @SuperBuilder was introduced in Lombok 1.18.2, it was not customizable (i.e., you could not manually add the builder class header). As a result, using @SuperBuilder with Jackson was not easily possible.
This changed with Lombok 1.18.4 (see this pull request): @SuperBuilder is now (at least partially) customizable, and this allows us to add the annotation. Beware that the code generated by @SuperBuilder is quite complex and heavily loaded with generics. To avoid accidentally messing up the code, you should have a look at the delombok output and copy/paste the class header from there. Here, you need add the builder implementation class header and put the annotation on it:
@JsonPOJOBuilder(withPrefix="")
static final class SubABuilderImpl extends SubABuilder<SubA, SubABuilderImpl>
Note that you have to broaden the visibility of SubABuilderImpl to at least package-private.
The @JsonDeserialize annotation must also refer to the builder implementation class, not the abstract builder:
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
Updated 2018-11-10: Lombok 1.18.4 released
For Lombok's @Builder and @SuperBuilder to work with Jackson, you have to add the builder class header manually and place a @JsonPOJOBuilder(withPrefix="") on it. Lombok will then generate only the remainder of the builder class. This is necessary because Jackson's default is that the builder's setter methods have "with" as prefix, but Lombok's builders don't have any prefix (and Lombok is not and will probably never be configurable in this regard).
When @SuperBuilder was introduced in Lombok 1.18.2, it was not customizable (i.e., you could not manually add the builder class header). As a result, using @SuperBuilder with Jackson was not easily possible.
This changed with Lombok 1.18.4 (see this pull request): @SuperBuilder is now (at least partially) customizable, and this allows us to add the annotation. Beware that the code generated by @SuperBuilder is quite complex and heavily loaded with generics. To avoid accidentally messing up the code, you should have a look at the delombok output and copy/paste the class header from there. Here, you need add the builder implementation class header and put the annotation on it:
@JsonPOJOBuilder(withPrefix="")
static final class SubABuilderImpl extends SubABuilder<SubA, SubABuilderImpl>
Note that you have to broaden the visibility of SubABuilderImpl to at least package-private.
The @JsonDeserialize annotation must also refer to the builder implementation class, not the abstract builder:
@JsonDeserialize(builder = SubA.SubABuilderImpl.class)
edited Nov 11 at 10:34
answered Oct 10 at 7:03
Jan Rieke
8701213
8701213
So as a result, you say that using the @SuperBuilder is currently not possible?
– Sebastian Thees
Oct 10 at 7:58
1
It is usable, only that it cannot be used for deserialization with Jackson.
– Jan Rieke
Oct 10 at 8:11
Lombok 1.18.4 has been released, allowing customized@SuperBuilders now. I update my answer with a working solution.
– Jan Rieke
Nov 10 at 17:45
add a comment |
So as a result, you say that using the @SuperBuilder is currently not possible?
– Sebastian Thees
Oct 10 at 7:58
1
It is usable, only that it cannot be used for deserialization with Jackson.
– Jan Rieke
Oct 10 at 8:11
Lombok 1.18.4 has been released, allowing customized@SuperBuilders now. I update my answer with a working solution.
– Jan Rieke
Nov 10 at 17:45
So as a result, you say that using the @SuperBuilder is currently not possible?
– Sebastian Thees
Oct 10 at 7:58
So as a result, you say that using the @SuperBuilder is currently not possible?
– Sebastian Thees
Oct 10 at 7:58
1
1
It is usable, only that it cannot be used for deserialization with Jackson.
– Jan Rieke
Oct 10 at 8:11
It is usable, only that it cannot be used for deserialization with Jackson.
– Jan Rieke
Oct 10 at 8:11
Lombok 1.18.4 has been released, allowing customized
@SuperBuilders now. I update my answer with a working solution.– Jan Rieke
Nov 10 at 17:45
Lombok 1.18.4 has been released, allowing customized
@SuperBuilders now. I update my answer with a working solution.– Jan Rieke
Nov 10 at 17:45
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Some of your past answers have not been well-received, and you're in danger of being blocked from answering.
Please pay close attention to the following guidance:
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f52734182%2flombok-superbuilder-example-with-json-annotations%23new-answer', 'question_page');
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown