request to enhance singleInstance for the case of different namespaces #2398
Labels
decided
A decision has been made (label added before the spec is changed)
discussion
Indicates that there's a discussion; not clear if bug, enhancement, or working as intended
Milestone
The specification V3.4 describes the annotation singleInstance in section 18.5. The described behavior is rather a onceUseOfClass and is only defined if the class and its instance are in the same namespace.
The remaining amount that the class and its instance are in different namespaces is omitted. However, this variant, in the sense of singleInstance without deleting the class, is also quite interesting.
As an example you can take the model World described in the specification V 3.4 under section 18.7 (page 244). Additionally it is assumed here that it is part of a package and has no relation to state machines.
In the example, the model is instantiated with a fixed name and as inner. A second instance makes little sense for the case of a class World. With singleInstance=true you could really prevent the second instantiation. When deleting the instance, the class should be preserved. In other words, for different namespaces, singleInstance=true means that the class can only be instantiated once and World can be instantiated again after deletion of the instance.
The text was updated successfully, but these errors were encountered: