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.
The details tabs that are active for interfaces are as follows.
ToDoItem
Standard tab.
Properties
See Section 17.15.2, “Interface Property Toolbar” and Section 17.15.3, “Property Fields For Interface” below.
Documentation
Standard tab. See Section 12.5, “Documentation Tab”.
Style
Standard tab.
The tick box Display Operations
allows
the operation compartment to be shown (the default) or hidden. This
is a setting valid for all diagrams that show the interface.
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.
Constraints
Standard tab. ArgoUML only supports constraints on Classes and Features (Attributes, Operations, Receptions, and Methods), so this tab is grayed out.
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 |
Go
up
Navigate up through the package structure.
Add
operation
This creates a new operation (see Section 17.7, “Operation”) within the interface, navigating immediately to the properties tab for that operation.
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 |
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
).
Navigate Stereotype
icon. If a
stereotype has been selected, this will navigate to the
stereotype property panel (see Section 15.4, “Stereotype”).
Namespace
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
and
private
. 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.
AssociationEnds
Text box. Lists any AssociationEnds (see Section 17.12, “Association End”) connected to this interface.
![]() | Note |
---|---|
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 17.7, “Operation”) defined on this interface. Button 1 double click navigates to the selected operation.
![]() | Caution |
---|---|
All operations on an interface must be public. The ArgoUML critics will complain if this is not the case. |