Java Enumeration Literal is mapped directly to the UML Property with the stereotype «JavaEnumerationLiteral». It does not require specific modifiers.

Java ElementUML Element
Literal declaration

UML Parameter with stereotype «JavaEnumerationLiteral», owned by UML Class with stereotype «JavaEnumeration»

Literal nameUML Property Name
Literal documentation

When using JavaDoc preprocessing, it is mapped to the UML Parameter Documentation; otherwise, it is part of the UML Operation Documentation.

 

Example

Java source code

enum MyEnumeration
{
ONE, TWO, THREE;
int attribute1;
String attribute2;
}

UML model

UML Class representing Java enumeration with enumeration literals