In PlantUML, annotations can not have members (hence the syntax error).
To display a UML diagram for your code, you will need to use another solution, like adding the annotation as a separate entity:
@startuml
annotation interface
class Foo {
String bar();
String baz();
}
interface -- Foo
@enduml
Or include the annotation in the class name definition:
@startuml
class "@interface Foo" as Foo {
String bar();
String baz();
}
@enduml
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…