[JAVA-2998] Investigate supporting the builder pattern for Pojo creation Created: 28/Sep/18 Updated: 30/Mar/22 |
|
| Status: | Backlog |
| Project: | Java Driver |
| Component/s: | POJO |
| Affects Version/s: | None |
| Fix Version/s: | None |
| Type: | New Feature | Priority: | Major - P3 |
| Reporter: | Ross Lawley | Assignee: | Unassigned |
| Resolution: | Unresolved | Votes: | 3 |
| Labels: | rp-toSched, size-medium | ||
| Remaining Estimate: | Not Specified | ||
| Time Spent: | Not Specified | ||
| Original Estimate: | Not Specified | ||
| Case: | (copied to CRM) |
| Description |
|
Projects like Lombok use the builder pattern when generating POJOs. Currently we only support Java Bean style convention of a public constructor then mutate with getter / setters or for immutable classes final values via a public constructor. Look to see if a Builder support could be added to construct the POJO via the builder instead of a constructor. |
| Comments |
| Comment by Ross Lawley [ 28/Sep/18 ] |
|
As builders are convention based perhaps this can be handled just by a specialized Convention that creates its own InstanceCreator that can set values via the builder pattern. |