Please note : This help page is not for the latest version of Enterprise Architect. The latest help can be found here.

Association Class


An Association Class connector is a UML construct that enables an Associate connector to have attributes and operations (features). This results in a hybrid relation with the characteristics of a connection and a Class. It is used to model particular types of connections in UML (see the OMG UML Specification for more details).

When you add an Association Class connection, Enterprise Architect also creates a Class that is automatically connected to the Association. When you hide or delete the Association, the Class is also hidden or deleted.

To add an Association Class to a Class or Deployment diagram, click on the Association Class icon in the Toolbox. Click and hold on the source object in the diagram while you drag the line to the target element, then release the mouse button. Enterprise Architect draws the connector and adds the Class, then prompts you to add the Class name. Note that the names of the Class and the connector are the same. You can also connect a new Class to an existing Association.

The following diagram illustrates an Association Class between model elements. Note the dotted line from the Class to the Association. You cannot move or delete this line.



If you are applying a stereotype with a Shape Script to an Association Class, be aware that the Shape Script is applied to both the Class part and the Association part. Therefore, you might have to include logic in the shape main that tests the type of the element so that you can give separate drawing instructions for Class and for Association. Such logic is not necessary in the:

  • shape source or shape target, which are ignored by Classes, or the
  • decoration shapes, which are ignored by Associate connectors.

If you dis-associate the Class from the Associate connector, both parts keep their Shape Scripts until the stereotypes are removed.

Toolbox Icon


OMG UML Specification

The OMG UML specification (UML Superstructure Specification, v2.1.1, p. 49) states:

A model element that has both association and class properties. An AssociationClass can be seen as an association that also has class properties, or as a class that also has association properties. It not only connects a set of classifiers but also defines a set of features that belong to the relationship itself and not to any of the classifiers.