Enhancement
Major
Detail
Major
Detail
Major
#26739
WrapperGenerator: Typed factory methods and addXxx(), removeXxx()
There is no way to create an object in Java code in a type-safe way. Incremental addition to and removal from collections is not supported by typed classes.
Improvement
The generated factory gets methods createMyType() and createMyType(TLObject context) regardless of whether it is a structured type or not.
For a multiple-reference things, additional methods addThing(Thing newValue) and removeThing(Thing oldValue) are generated.
Also for unordered multi-references, a set <T> getMyRefModifiable() is generated.
Code migration
The newMyType() methods for non-structured types is omitted. The createMyType() method must be used instead.
The generic factory method Object createObject(Object context, TLClass type, ValueProvider initialValues); is omitted, instead the also existing method TLObject createObject(TLClass type, TLObject context, ValueProvider initialValues) must be used.
Test
test.com.top_logic.element.model.generate.TestWrapperGenerator