Skip to content

use class member arrows to start relationship between a class field of a type and its type UML class #107

@lucsorel

Description

@lucsorel

#3636 Arrows from/to class fields

Right now, PlantUML would describe the composition relationship between a person and its address like this (an arrow between the 2 classes):

@startuml
class Address {
 street: str
 zipcode: str
 city: str
}

class Person {
 name: str
 address: Address
}

Person -> Address
@enduml

But it would be interesting to have the relationship starting from the Person.address field:

@startuml
class Address {
 street: str
 zipcode: str
 city: str
}

class Person {
 name: str
 address: Address
}

Person::address -> Address
@enduml

Although the rendering is not so relevant on this example.

Caution:

  1. what behavior do we want when several fields of a class link to the same class? One specific line per field? One general line between the 2 classes? Readability matters.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions