TRIMM Java supported UML Stereotypes and Tagged Values

See here for the TRIMM JPA supported UML Stereotypes and Tagged Values

Note: ExtensionClass, NoExtensionClass and DontGenerate stereotypes can be applied at the package level too an will automatically apply to all elements inside the package.

Generic Java stereotypes and Tagged Values

Name (case insensitive) Type Applies to Description
DontGenerate Stereotype Every UML element Name of the stereotype that can be applied to Classes, Interfaces, Enumerations, Operations and Properties to indicate that they shouldn’t be included in the generation process
Owner Stereotype UML Property / Association Role Can be applied to a role/association-end/property to specify that it’s the owner of the association if the defaults don’t work for you
Immutable Stereotype UML Property Stereotype that can be applied to properties to indicate that the property is immutable (must be initialized at Object creation time and not be writeable)
NoDuplicates Stereotype UML Property / Association Applies to One-to-Many and Many-to-Many associations. Indicates that Set collection semantics must apply (see JavaCollectionTypeResolver for more)

Note: If nothing is specified then all Collections default to Set collection semantics

Bag Stereotype UML Property / Association Applies to One-to-Many and Many-to-Many associations. Indicates that Bag collection semantics must apply (see JavaCollectionTypeResolver for more)
Sorted Stereotype UML Property / Association Applies to One-to-Many and Many-to-Many associations. Indicates that TreeSet collection semantics must apply (see JavaCollectionTypeResolver for more)
Ordered Stereotype UML Property / Association Applies to One-to-Many and Many-to-Many associations. Indicates that List collection semantics must apply (see JavaCollectionTypeResolver for more)
Constructor Stereotype UML Class Support creating a Class constructor which contains parameters by looking a the Class’ (and its parents) which are marked with the ConstructorArgument stereotype. Each property will automatically be set or chained to parent constructor (using a sorted algorithm for property names). If you wish to specify more constructor body code, then this can be specified by setting the ConstructorBody tagged value on the Class
ConstructorArgument Stereotype UML Property / Association Role See description for Constructor
ConstructorBody Tagged value UML Class See description for Constructor
Implemented Stereotype UML Operation/Method Stereotype that can be applied to Operations to indicate that their implementation is specified in UML using the MethodBody tagged value

Note: This is an alternative to using the code segment in UML (which is supported by EA but not by MagicDraw)

MethodBody Tagged value UML Operation/Method See description for Implemented
HashCodeAndEquals Stereotype UML Class / Property Generates a hashCode and equals method pair (using Commons.Lang’s EqualsBuilder and HashCodeBuilder) for either all properties in the class (if the stereotype is applied at class level) or for the individual properties (if applied at the property level).

Requires you use the HashCodeAndEqualsListener

ExtensionClass Stereotype UML Class/ UML Package Extension class generation (Generator Gap pattern / 3 level inheritance) is FORCED even if it isn’t turned on generally
NoExtensionClass Stereotype UML Class/ UML Package Extension class generation (Generator Gap pattern / 3 level inheritance) is prohibited even if it’s turned on generally
LiteralInitValue Tagged value UML Property The tagged value that can be used with Enumeration Literals to indicate a construction time property values (being passed to a fabricated constructor)
DefaultValue Tagged value UML Property Alternative Tagged value which can be used to specify a default value in UML tools that doesn’t allow defaultValue or has poor support for it (e.g. MagicDraw, which doesn’t allow array style initialization as defaultValue content)