You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Jul 27, 2022. It is now read-only.
The limitations listed in the transformation doco effectively render it useless for me. I very often have multiple constructors, use inheritance and have mostly immutable classes where the constructors contain some logic.
Are there any plans to improve this? In particular, provide a way to specify the constructors to use. One way is via annotations. Another would be to allow defaults to be specified. e.g. default to always calling the unnamed constructor, or a constructor called say 'build'.
FYI I do support such features in shelf_bind and it wasn't overly complex from memory, but that was with mirrors - I haven't tried transformers yet - maybe that is trickier?
Limitations
Note that this is quite limited. It does not handle inheritance at all. If constructors have parameters which are not of the form "this.field", those will always be passed as null. It will always use the constructor with the fewest parameters. It does handle getter/setter pairs and getters or fields which correspond to constructor parameters. It will probably not work with part files, and it expects all the classes that will be serialized to be listed in those files.
The limitations listed in the transformation doco effectively render it useless for me. I very often have multiple constructors, use inheritance and have mostly immutable classes where the constructors contain some logic.
Are there any plans to improve this? In particular, provide a way to specify the constructors to use. One way is via annotations. Another would be to allow defaults to be specified. e.g. default to always calling the unnamed constructor, or a constructor called say 'build'.
FYI I do support such features in shelf_bind and it wasn't overly complex from memory, but that was with mirrors - I haven't tried transformers yet - maybe that is trickier?