Can this work with getter/setter?
See original GitHub issueHi! 😃
I was wondering, can this mapper work by mapping public attributes to their appropriate setter or getter (depending on the map direction).
Consider this example
class User {
private _firstname: string;
public set firstname(value: string) { this._firstname = value; }
public get firstname(value: string) { return this._firstname; }
}
class UserVm {
@AutoMap()
public firstname: string;
}
My questoini is how to get a bi-directional map between User and UserVm? Hopefully not by manually assigning every public property to a setter/getter 😃
Thanks!
Issue Analytics
- State:
- Created 4 years ago
- Comments:12 (9 by maintainers)
Top Results From Across the Web
Getter and Setter in Java - GeeksforGeeks
Getters and setters let you manage how crucial variables in your code are accessed and altered. It can be seen in the program...
Read more >Getters and Setters in Java Explained - freeCodeCamp
The getter method returns the value of the attribute. The setter method takes a parameter and assigns it to the attribute. Once the...
Read more >@Getter and @Setter - Project Lombok
You can annotate a class with a @Getter or @Setter annotation. Doing so is equivalent to annotating all non-static fields in that class...
Read more >Property getters and setters - The Modern JavaScript Tutorial
Getters/setters can be used as wrappers over “real” property values to gain more control over operations with them. For instance, if we want...
Read more >Significance of Getters and Setters in Java - Baeldung
Getters and Setters play an important role in retrieving and updating the value of a variable outside the encapsulating class.
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 Free
Top 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
Hey @nartc After updating to the latest version (3.1.0) the issue is resolved and everything works like a charm 😃 Thanks!
Check the latest version (3.0.5) and let me know if you still have issue.