UML Modeling Techniques > Class modeling > Interfaces > Adding a dependency to a lollipop or cup on a diagram
Adding a dependency to a lollipop or cup on a diagram
If you have an Interface shown as a lollipop or cup on a Class Diagram or Composite Structure Diagram, you can add a Dependency to that Interface to show it as both a required and provided Interface Class.
To add a uses dependency to a lollipop:
1. On the Class Diagram or Structure Diagram tab, click the Required Interface button.
2. Click the Class, Data Type, Signal, Part or Port on which the Interface is dependent.
3. Click the lollipop.
Note that when the mouse pointer is over the Interface, a ToolTip shows the names of the two items being linked.
Modeler adds a uses Dependency to the diagram. If there is a valid uses Dependency in the Model, Modeler uses that Dependency. If there is not a valid uses Dependency in the Model, Modeler creates a new Dependency.
To add a realization interface dependency to a cup:
1. On the Class Diagram or Structure Diagram tab, click the Provided Interface button.
2. Click the Class, Data type, Signal, Part or Port on which the Interface is dependent.
3. Click inside the cup.
Note that when the mouse pointer is over the Interface, a ToolTip shows the names of the two items being linked.
Modeler adds an interface realization Dependency to the diagram. If there is a valid interface realization Dependency in the Model, Modeler uses that Dependency. If there is not a valid interface realization Dependency in the Model, Modeler creates a new Dependency.