Sunday, 3 September 2023

How to Group Classes Together in PlantUML Diagrams?

Using ‘together’ keyword, we can group some classes together.

together.txt

@startuml

together {
	interface Appendable
	interface Cloneable

        class System
}

together {
	interface Collection<E>
	interface List<E>

	class ArrayList<E> implements List
}

Appendable -[hidden]--> Collection

@enduml

 

‘hidden’ links can be used to force the layout.

 

Above snippet generate below diagram.



 

 

Previous                                                    Next                                                    Home

No comments:

Post a Comment