How to define an interface in a Component Diagram?

0 votes
asked May 20 in Question / help by solarjoe (160 points)

How can I definen aninterface in a Component Diagram?

The documentation at https://plantuml.com/en/component-diagram as interface blocks defined using

interface "Last\ninterface" as Interf4

But how to add fields?

I tried to use the syntax from the class diagram

interface "Last\ninterface" as Interf4{
  String data
  void methods()
}

and this works when I use the "Edit online" on the page, but not in my IDE (VS Code with jebbs PlantUML).

Is this the correct syntax?

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.
...