how to model <Type> notation or UI parent/child notation

15 views
Skip to first unread message

Paul Allard

unread,
Sep 20, 2023, 1:13:52 AM9/20/23
to UML Forum
I apologize if this is an old question.  It is not clear whether the search bar picked up on the <Type> syntax.

Part 1: Is <Type> notation shown in a UML Class Diagram?  

Type notation is used in many Java-like languages.  Here is a very simple example.  
List<Person> People = {Person person1, Person person2}; 
Where People is a simple aggregation of Person Classes/Objects.   There are more complex examples should this prove too simple.  

Part 2: In some UI languages Parent/Child relationships are shown as explicit parameters in the constructors.  Are these relationships shown in a Class Diagram?

Class Page {
  build() {
    return Scaffold( 
      child: MyCheckbox, 
    );
  } 
}

MyCheckbox is a distinct class where Page is composed of these subclasses.  Are these relationships shown in a Class Diagram?

I use a UML generator called PlantUML and DCDG which generates UML from code.  It gives me a test as to whether my code is meeting my expectations.  Currently the tool does not diagram these 2 types of relationships.  I wanted to submit an issue on these but was looking for some validation before I submitted the issue.    What do you think?
Reply all
Reply to author
Forward
0 new messages