-
Notifications
You must be signed in to change notification settings - Fork 420
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
Implement some way to "clone" builders #17
Comments
What if there was a |
I'm implementing this idea on edit: and the server versions... even though it's less likely to be needed. |
Actually I just did it for the server config because I needed them most :-) |
So I will stick with my local changes and wait for your fix! Thanks!! Just to let you know what I did. I created two additional constructors, beside the default one. Taking in "Config" and "ConfigBuilder" each. The "ConfigBuilder" just calls "this ( other.build() )", which may not be that performant, but this should not be called that often either. But that allows one to clone the builder and also create a mutable version from an existing configuration again. True, every type used by the configuration, should be immutable as well. |
Adds copy() methods to the UaTcpStackClientConfig and OpcUaClientConfig objects that allow for easier copying and modification of an existing config.
So I've done half the work... added |
Adds copy() methods to the UaTcpStackServerConfig and OpcUaServerConfig objects that allow for easier copying and modification of an existing config.
Just missing tests for the server config objects now. |
Adds copy() methods to the client and server config objects that allow for easier copying and modification of an existing config.
[#17] copy() methods for config objects
Adds copy() methods to the client and server config objects that allow for easier copying and modification of an existing config.
[eclipse#17] copy() methods for config objects
Setting up a builder like
OpcUaClientConfigBuilder
takes "a few" parameters and method calls.It would be nice to have either a "clone" method or a "copy constructor" in the builder pattern so that there is no need to do it all over again when only one parameter needs to be changed but you want to keep a mutable instance.
The text was updated successfully, but these errors were encountered: