Many programming languages offer a way to annotate types.For instance, in .NET this can be achieved by deriving a custom attribute class from System.Attribute and then annotating another type with this:[AttributeUsage(AttributeTargets.Class, AllowMultiple = false)]public sealed class SuperSpecialAttribute : Attribute { ... }[SuperSpecial]public class MyClass { ... }My question is; how can I show that MyClass has the attribute SuperSpecialAttribute on a UML class diagram?
How can attributes/annotations be illustrated on a UML class diagram?
uml;class diagram;annotations;attributes
You could represent the annotation as a stereotype, and then apply the stereotype to the class.    +----------------------+    |   <<SuperSpecial>>   |    |       MyClass        |    +----------------------+If your annotation has attributes, you can represent them as tagged values on the class. Tagged attributes have different syntax in UML 1.x and UML 2.xIn UML 1.x you put tagged values between {}, like this:    +----------------------+    |   <<SuperSpecial>>   |    | {AllowMultiple=true} |    |       MyClass        |    +----------------------+In UML 2.x you can use a section for the stereotype attributes:    +----------------------+    |   <<SuperSpecial>>   |    |       MyClass        |    +----------------------+    | <<SuperSpecial>>     |    | AllowMultiple=true   |    +----------------------+