Home

# Class goog.module.ModuleInfo

A ModuleInfo object is used by the ModuleManager to hold information about a module of js code that may or may not yet be loaded into the environment.

extends goog.Disposable

Instance Method Summary
| `callCallbacks_(?Array callbacks, <Any Type> context) ⇒ ?Array.<*>` Helper to call the callbacks after module load.

`disposeInternal()`

Deletes or nulls out any references to COM objects, DOM nodes, or other disposable objects. Classes that extend {@code goog.Disposable} should override this method. Not reentrant. To avoid calling it twice, it must only be called from the subclass' {@code disposeInternal} method. Everywhere else the public {@code dispose} method must be used. For example:

    mypackage.MyClass = function() {
    goog.base(this);
    // Constructor logic specific to MyClass.
    ...
    };
    goog.inherits(mypackage.MyClass, goog.Disposable);

    mypackage.MyClass.prototype.disposeInternal = function() {
    goog.base(this, 'disposeInternal');
    // Dispose logic specific to MyClass.
    ...
    };

| `getDependencies() ⇒ ?Array.<string>` Gets the dependencies of this module.
| `getId() ⇒ string` Gets the ID of this module.
| `getModule() ⇒ ?goog.module.BaseModule` Gets the module.
| `getUris() ⇒ ?Array.<string>` Gets the uris of this module.
| `isLoaded() ⇒ boolean` Determines whether the module has been loaded.
| `onError(?goog.module.ModuleManager.FailureType cause)` Calls the error callbacks for the module.
| `onLoad(function (): (Object|null) contextProvider) ⇒ boolean` Sets this module as loaded.
| `registerCallback(?Function fn, ?Object= opt_handler) ⇒ ?goog.module.ModuleLoadCallback` Registers a function that should be called after the module is loaded.
| `registerCallback_(?Array callbacks, ?Function fn, ?Object= opt_handler) ⇒ ?goog.module.ModuleLoadCallback` Registers a function that should be called after the module is loaded.
| `registerEarlyCallback(?Function fn, ?Object= opt_handler) ⇒ ?goog.module.ModuleLoadCallback` Registers a function that should be called after the module is loaded. These early callbacks are called after {@link Module#initialize} is called but before the other callbacks are called.
| `registerErrback(?Function fn, ?Object= opt_handler) ⇒ ?goog.module.ModuleLoadCallback` Registers a function that should be called if the module load fails.
| `setModuleConstructor(?Function constructor)` Sets the constructor to use to instantiate the module object after the module code is loaded.
| `setUris(?Array.<string> uris)` Sets the uris of this module.