interfaces.Initializable

A class that is initializable via __init__ or __defer_init__. Non-interface related arguments (...args...) are passed to the __init__ function immediately after super creation. Should calls in the class constructor that come after super depend on special circumstances in a static __new__/create function, __defer_init__ must be used and passed in the "a" argument to designate this. If __defer_init__ is passed, the presence of an __init__ is not enforced, but still called anyway should it exist on the member. Note that __defer_init__ is not called by Initializable.

Extends

Classes

Initializable

Methods

abstract __defer_init__() → {interfaces.Initializable}

Initializes a constructed class, but can be custom called later on in the object construction process, otherwise this will remain unused.
Returns:
interfaces.Initializable - this

abstract __init__() → {interfaces.Initializable}

Initializes a constructed class.
Returns:
interfaces.Initializable - this

isImplemented(funcs) → {Interface|*}

Determines during runtime at object creation whether the object in question successfully implements functions or properties. Forwards calls to class method version.
Parameters:
Name Type Description
funcs Iterable.<(string|function())> The iterable containing properties that are checked.
Throws:
Error if a required prototype or static property is missing.
Returns:
Interface | * - The checked instance.
Inherited From:
See:
  • interfaces.Interface.isImplemented