Constructing an Interface

The final type of external definition that you can define is an Interface. You do so using the interface keyword directive. Table 1-7 shows an example.

Table 1-7. The structure of an interface definition

  package [folder[, folder... ]]     interface IInterfaceName [ extends InterfaceName ]     {         //BODY OF THE DEFINITION;     }   }

In this example, the definition's name, InterfaceName appears to begin with two Is. The first I is to indicate that the name refers to an interface. Like a class definition, an interface definition can specify a superclass, but it must be that of an interface. Just as the name implies, and as you saw earlier when analyzing the IEventDispatcher Interface, all methods declared must ...

Get AdvancED ActionScript 3.0: Design Patterns now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.