Type.registerInterface Method

Registers an interface defined by a constructor.

var interfaceVar = typeInstanceVar.registerInterface(typeName)

typeName

A string that represents the fully qualified name of the class to be registered as an interface.

The registered interface.

Exception type

Condition

Error.argument

(Debug) typeName cannot be evaluated as a defined type.

Error.invalidOperation

(Debug) The interface specified by typeName is already registered.

Use the registerInterface method to register an interface as defined by a constructor.

You invoke the registerInterface method after the interface has been defined, but before it is instantiated. The registerInterface method is invoked directly from the type.

Implementing an Interface

Methods of the Type class support implementing an interface. Implement an interface by specifying a registered interface in the interfaceTypes parameter of the registerInterface method when you register a class.

Interfaces should not implement any members, because any class that implements the interface must overwrite those members.

Show: