Class diagram: how to represent deprecated static method

0 votes
asked Nov 12, 2025 in Question / help by sjoerdtalsma (200 points)

I use strikethrough to represent deprecated fields and methods in a class diagram.

This renders nicely, _unless_ the method is also static.

For example:

class Test {
    +normalMethod(): void
    +--deprecatedMethod--(): void
    {static} +staticMethod(): void
    {static} +--deprecatedStaticMethod--(): void
}
Gets rendered as:
image
What is the recommended way to represent static deprecated methods?
commented Nov 12, 2025 by sjoerdtalsma (200 points)
moved Feb 18 by sjoerdtalsma
Ideally, using something like {deprecated} in addition to {static} and {abstract} would be welcome to be even more semantically expressive.
commented Nov 14, 2025 by The-Lu (88,340 points)

Hello all,

In order to precise the defect:

OK on PNG: yes

KO on SVG output: no

For debug purpose...

Regards,
Th.

commented Nov 24, 2025 by sjoerdtalsma (200 points)
Thank you for the addition; I couldn't get the screenshots to work in this forum software.
commented Feb 18 by sjoerdtalsma (200 points)
Has there been progress on this issue?

The fact that the rendering is ok for PNG, while SVG is 'wrong' is interesting.
commented Feb 18 by The-Lu (88,340 points)

Not yet.

But I have just opened this issue directly on:

Regards,
Th.

1 Answer

+1 vote
answered Feb 18 by The-Lu (88,340 points)
selected Feb 19 by sjoerdtalsma
 
Best answer

Hello S.,

Could you test with the last snapshot (v1.2025.2+) here:

We made a first change.

Enjoy,
Regards,
Th.

commented Feb 19 by sjoerdtalsma (200 points)
Yes, my previously failing rendering now succeeded.

Thank you very much for tackling this!

I'll be sure to upgrade to 1.2026.2+ as soon as it comes out.
...