Work with dependencies in UML static structure diagrams
Bind template parameters to classes
-
Drag a Bound Element shape from UML Static Structure onto the drawing page near the Parameterized Class shape with parameters you want to bind.
-
Drag a Binding shape onto the drawing page and glue the endpoint without an arrowhead to a connection point on the bound element.
-
Glue the Binding endpoint with an arrowhead to a connection point on the Parameterized Class shape.
-
Double-click the Binding shape, and then click Bound Arguments.
-
Under Bound Arguments, select a parameter to which you want to bind a type (if the parameter has no type specified) or select a value (if the parameter has a type specified). Click Properties, choose the type or type the value you want, and then click OK.
-
Click OK to close the UML Binding Properties dialog box.
Attributes and operations associated with the parameterized class are passed to the bound element. Unbound parameters (with no specified type) that you have assigned to the class as attribute types or operation return types, are replaced in the bound element by the types you specified in step 5 above.
Indicate a dependency relationship between UML elements
-
Drag a Dependency shape from UML Static Structure, UML Deployment, or UML Component onto the drawing page and place it near the elements you want to relate.
-
Glue the endpoint with an arrowhead to a connection point on the element the other element depends on. Glue the endpoint without an arrowhead to a connection point on the element that depends on the other element.
-
Double-click the dependency to add a name, stereotype, and other properties.
Tip
If you want to indicate a trace, refinement, usage, or binding dependency, you can use the Trace, Refinement, Usage, or Binding shapes from the UML Static Structure stencil.
Indicate that classes in a package may be referenced
-
In a package diagram, drag a Dependency shape onto the drawing page.
-
Glue the Dependency endpoint without an arrowhead to a connection point on the package that will reference the classes in another package.
-
Glue the Dependency endpoint with an arrowhead to a connection point on the package that contains the target classes that will be referenced.
-
Double-click the Dependency shape to open the UML Dependency Properties dialog box.
-
Under Name, type a name for the dependency. Under Stereotype, choose Import, and then click OK.
Note: Connecting packages with an <<import>> dependency only indicates that classes can be referenced. You still need to set the appropriate visibility for the target classes.
No comments:
Post a Comment