moster67 Expert Licensed User Longtime User Mar 20, 2017 #1 Is it possible to wrap a Builder pattern? I think the JavaObject uses a Builder pattern so probably it is possible. Any idea how to do it, perhaps an example? Edit Maybe javaobject is an example of method chaining and is not relevant to the Builder? Thanks. Last edited: Mar 20, 2017
Is it possible to wrap a Builder pattern? I think the JavaObject uses a Builder pattern so probably it is possible. Any idea how to do it, perhaps an example? Edit Maybe javaobject is an example of method chaining and is not relevant to the Builder? Thanks.
Erel B4X founder Staff member Licensed User Longtime User Mar 21, 2017 #2 moster67 said: Is it possible to wrap a Builder pattern? Click to expand... Yes. B4X: public StringBuilderWrapper Append(String Text) { getObject().append(Text); return this; <-------------------- }
moster67 said: Is it possible to wrap a Builder pattern? Click to expand... Yes. B4X: public StringBuilderWrapper Append(String Text) { getObject().append(Text); return this; <-------------------- }