The Mozilla
Organization
At A Glance
Feedback
Get Involved
Newsgroups
License Terms
Newsbot
Developer Docs
Roadmap
Projects
Ports
Module Owners
Hacking
Get the Source
Build It
Testing
Download
Bugzilla
Bug Writing
Tools
View Source
Tree Status
New Checkins
Submit A Bug
FAQ
Search

Interface

Definition

  • An interface "is a set of named operations that can be invoked by clients" (Component Software, p. 40).
  • An interface is given by a contract that completely specifies the operations within the interface and any pre-conditions and post-conditions that may exist for those operations.
  • An interface can be provided by either a component (as with traditional libraries) or an object made available by a component.

Notation

The symbol for an interface is a line segment with a circle at the end:

The line segment may begin at any of four other symbols. If the interface is connected to an object symbol, it indicates that the object supports that interface:

If the interface is connected to a class symbol, it indicates that objects instantiated for that class will support that interface:

If the interface is connected to a component it means that the component supports that interface. This typically requires the component to instantiate a singleton object that supports the interface and maintains some knowledge about the component as a whole:

If the interface is connected to a module it means that the module supports that interface. This typically requires the module to instantiate a singleton object that supports the interface and maintains some knowledge about the module as a whole:


 

Copyright © 1998-1999 The Mozilla Organization.
Last modified August 23, 1999.