PrestigeDev
PrestigeDev

Reputation: 627

Visual Paradigm set attribute to final in class diagram

Hello I want to draw a class diagram with Visual Paradigm and I have to set my attributes to "final".

I tried the following Syntax: -final id : UUID

When I generate a getter it looks like this: +getFinal id() : UUID

I expected +getId() : UUID

Upvotes: 0

Views: 3012

Answers (1)

Pétur Ingi Egilsson
Pétur Ingi Egilsson

Reputation: 4503

UML does not specify what 'final' means. That is a Java keyword.

Place a readOnly modifier on your property.

In order for that to show up in the diagram, you must right click the diagram, go Presentation Options, go Attribute Display Options and tick Show Property Modifiers. Example

Upvotes: 1

Related Questions