You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
< and > are problematic by themselves due to potential of script injection, which is why we ended up using ~ ~ to signify generics.
:: is already being used as shorthand to associate a node with a class
From the link you provided there are two ways that this can be displayed, one is similar to what we already support, such as: ClassA<ClassB>, displayed without any members
I am thinking that since this is an alternative method for displaying parameterized classes the priority of adding this is fairly low, but that could be changed based on requests ;)
So I guess what you are saying is in defining a bound implementation (i.e. ClassB<String>) it is implying that String is substituted for T defined in members of the superclass/interface (ClassA)?
i.e. ClassA~T~ <|-- ClassB~String~
Not ideal, but I accept there are challenges in supporting the additional syntax. Thanks for following up.
Proposal
UML provides a syntax for type binding via parameterized class:
http://etutorials.org/Programming/UML/Chapter+6.+Class+Diagrams+Advanced+Concepts/Parameterized+Class/
This proposal seeks to be able to add a label on a relationship using the following syntax:
ClassA~T~ <|-- ClassB: <<bind>>T::String
In this example the type
String
is bound to generic typeT
for implementationClassB
.Currently this is a syntax error due to not supporting
<<>>
and::
in labels.Example
ClassA~T~ <|-- ClassB: <<bind>>T::String
Screenshots
No response
The text was updated successfully, but these errors were encountered: