FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

org.immutables example with mapstruct by norrs · Pull Request #80 · mapstruct/mapstruct-examples · GitHub

org.immutables example with mapstruct - #80

Open
norrs wants to merge 1 commit into
mapstruct:mainfrom
norrs:immutables
Open

org.immutables example with mapstruct#80
norrs wants to merge 1 commit into
mapstruct:mainfrom
norrs:immutables

Conversation

norrs commented Apr 16, 2020

Copy link
Copy Markdown

I didn't notice any example for how to quickly get started with org.immutables together with mapstruct, so here a rather simple example.

@JsonDeserialize(builder = ApiPerson.Builder.class)
@ExampleStyle
public interface ApiPerson {
String getId();

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

I wish we didn't need getters here on the immutables, and we could have stayed with fluent getters, but mapstruct requires POJOs with getters I believe.

The builders however supports the fluent setters.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Immutables is able to support this. This is from Immutables documentation:
"No annotations are required on abstract accessor methods in order for them to become attributes."

https://immutables.github.io/immutable.html#overview

Can we modify the ImmutablesAccessorNamingStrategy to support abstract accessors to qualify as getters.

norrs commented Apr 17, 2020

Copy link
Copy Markdown
Author

Related to #65

norrs commented Sep 16, 2020

Copy link
Copy Markdown
Author

If anyone wants to continue on this PR to fix an example, they are free to do so. I think #80 (comment) is probably the correct way of doing it. So if someone knows, please just go a head and update. :) (cc @vijaysingh0507 )

fabricio-ecore commented Oct 28, 2021
edited
Loading

Copy link
Copy Markdown

you have not merged yet =(

This file contains hidden or 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL