-
Notifications
You must be signed in to change notification settings - Fork 58
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support for builder pattern to construct objects of custom classes #57
Comments
Thanks for the interest! I'm not sure I understand what toml4j would pass to the builder, or why built-in support is needed. Is this builder auto-generated or hand-written? |
The same thing as to custom classes. When populating custom classes, (I think) the process is following:
When deserializing to custom classes instantiated via builder, process is following:
Not needed, and could be created on top of
Usually auto-generated. Either by IDE's extensions, or via annotation processing (lombok, immutables, google-auto,...), or from contract definition (Google Protocol Buffers, ...). |
I would like to use TOML (toml4j) for (de)serialization of model classes for my project. I strongly prefer value based approach to model classes, and use immutable classes with builder pattern for construction.
I found support for custom classes in README.md, but there's no mention of builder pattern support, therefore I assume it's not implemented. However, I would be very glad to have such feature.
Also, as my project uses models defined in another project. I would like to use builder based construction without need of annotations (ie. annotation based configuration is optional).
For example:
Assume for example:
The text was updated successfully, but these errors were encountered: