How to present the association composition of an anonymous class defines in the class itself in the UML 2?
Thanks
How to present the association composition of an anonymous class defines in the class itself in the UML 2?
Thanks
In either of the shown ways:
See also p. 716 and 12.2.4 Notation on p. 246 for the nesting connector.
As @JimL. suggests, an anonymous class has no name. It would look like this:
However, it does not make much sense to use anonymous classes in a model for obvious reasons. Honestly, I don't know any programming language which permits anonymous classes, but there are probably such. From what I estimate they are just syntactic sugar to ease certain programming tasks. And for that reason (too) they should not be modeled. (Just my few cents here)