18.15. Interface

An interface is a set of operations characterizing the behavior
of an element. It can be usefully thought of as an abstract class with
no attributes and no non-abstract operations. In the UML metamodel it
is a sub-class of Classifier and through that
GeneralizableElement.

An interface is represented on a class diagram as a rectangle
with two horizontal compartments. The top compartment displays the
interface name (and above it ??interface??) and the
second any operations. Just like a class, the operations compartment
can be hidden.

Standard tab. The tick box Display
Operations allows the operation compartment to be
shown (the default) or hidden. This is a setting valid for
only the current diagram. The Bounds:
field defines the bounding box for the package on the
diagram.

Source

Standard tab. This contains a template for the interface
declaration and declarations of associated interfaces.

Tagged Values

Standard tab. In the UML metamodel,
Interface has the following standard tagged values
defined.

persistence (from the superclass,
Classifier). Values
transitory, indicating state is
destroyed when an instance is destroyed or
persistent, marking state is preserved when an
instance is destroyed.

Warning

Since interfaces are by definition abstract, they
can have no instance, and so this tagged value must
refer to the properties of the realizing class.

semantics (from the superclass,
Classifier). The value is a
specification of the semantics of the interface.

derived (from the superclass,
ModelElement). Values
true, meaning the interface is
redundant???it can be formally derived from other elements,
or false meaning it cannot.

Note

Derived interfaces still have their value in
analysis to introduce useful names or concepts, and in
design to avoid re-computation.

Note

The UML Element metaclass from
which all other artifacts are derived includes the tagged
element documentation which is handled by
the documentation tab under
ArgoUML

Checklist

Standard tab for an Interface.

18.15.2. Interface Property Toolbar

Go up

Navigate up through the package structure.

New
operation

This creates a new operation (see Section 18.7, “Operation”) within the interface,
navigating immediately to the properties tab for that
operation.

New
reception

This creates a new reception, navigating immediately to
the properties tab for that reception.

New
interface

This creates a new interface in the same namespace as
the selected interface, navigating immediately to the
properties tab for the new interface.

New
Stereotype

This creates a new Stereotype (see Section 16.5, “Stereotype”) for the selected interface,
navigating immediately to the properties tab for that
stereotype.

Delete

This deletes the interface from the model

Warning

This is a deletion from the model
not just the diagram. To delete an
interface from the diagram, but keep it within the model,
use the main menu Remove From Diagram (or
press the Delete key).

18.15.3. Property Fields For Interface

Name

Text box. The name of the interface. The name of an
interface has a leading capital letter, with words separated
by “bumpy caps”.

Note

Unlike classes, the ArgoUML critics will not complain
about interface names that do not have an initial
capital.

Stereotype

Drop down selector. Interface is provided by default
with the UML standard stereotypes for the parent meta-class,
Classifier ( metaclass,
powertype, process,
thread and
utility).

Drop down selector. Records and allows changing the
namespace for the interface. This is the package
hierarchy.

Modifiers

Check box, with entries Abstract,
Leaf and Root.

Abstract is used to declare that
this interface cannot be instantiated, but must always be
specialized. The name of an abstract interface is
displayed in italics on the diagram.

Caution

This is meaningless, since by definition an
interface is an abstract entity. The UML 1.3
standard offers no clarification.

Leaf indicates that this
interface cannot be further specialized, while
Root indicates it can have no
generalizations.

Visibility

Radio box, with three entries
public, protected,
private and package.
Indicates whether navigation to this end may be by: i) any
classifier; ii) only the source classifier and its children;
or iii) only by the source classifier.

Generalizations

Text area. Lists any interface that
generalizes this interface.

Button 1 double click navigates to the
generalization and opens its property tab.

Specializations

Text box. Lists any specialized interface (i.e. for
which this interface is a generalization.

Button 1 double click navigates to the
generalization and opens its property tab.

Associations between classes and interfaces
must be navigable
only from the class to the interface.
ArgoUML will create associations between classes and
interfaces with the correct navigability, but does not
prevent the user from altering this.

Button 1 double click navigates to the selected
entry.

Operations

Text area. Lists all the operations (see Section 18.7, “Operation”) defined on this interface.
Button 1 double click navigates to the selected
operation. Button 2 click will show a popup menu with two
items: Move Up and Move
Down, which allow reordering the operations.

Caution

All operations on an interface
must be public. The ArgoUML critics
will complain if this is not the case.