Immutability
See original GitHub issueI’d like the DTOs generated by graphql-java-codegen
to optionally be “immutable”.
By “immutable” I mean that the generated classes do not have any setters. Very similar to to what Lombok does with its @Value
annotation.
A generated class with this feature enabled should look like:
public class Person {
// Everything as usual, except...
// NO SETTERS IN HERE
}
If you approve the addition of this feature, I am happy to implement and PR it.
Issue Analytics
- State:
- Created 3 years ago
- Reactions:2
- Comments:17 (15 by maintainers)
Top Results From Across the Web
Immutable Definition & Meaning - Merriam-Webster
Immutable may describe something that is incapable of change, but the word itself—like all words—is mutable, both capable of and prone to ...
Read more >Immutability Definition & Meaning - Dictionary.com
the state or condition of being unchangeable:These findings contradict previous myths about the genetic immutability of intelligence at birth.
Read more >Immutability - Stanford Encyclopedia of Philosophy
The doctrine of divine immutability (DDI) asserts that God cannot undergo real or intrinsic change in any respect.
Read more >Immutable object - Wikipedia
In object-oriented and functional programming, an immutable object (unchangeable object) is an object whose state cannot be modified after it is created.
Read more >17 Synonyms & Antonyms for IMMUTABILITY - Thesaurus.com
synonyms for immutability · perpetuation · dependability · durability · permanency · stability ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Just to confirm: Starting from version 2, together with the feature described in #148, MapStruct can now target immutable DTOs and will instantiate them via the builder 🎊
I think that
generateImmutableModels
(verb, adjective, noun) better fits other, already existing, names such asgenerateAsyncApi
, so I’ll choose that.