goog.module.ModuleInfo
Classgoog.module.ModuleInfo
> goog.Disposable
goog.module.ModuleInfo(deps, id)
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.
deps
{Array
.<string
>}
id
{string
}
.addOnDisposeCallback(callback, opt_scope)
Inherited from goog.Disposable
.
Invokes a callback function when this object is disposed. Callbacks are invoked in the order in which they were added.
callback
{!Function
}
opt_scope
{Object
=}
.creationStack
{string
}Inherited from goog.Disposable
.
If monitoring the goog.Disposable instances is enabled, stores the creation stack trace of the Disposable instance.
.dispose()
Inherited from goog.Disposable
.
Disposes of the object. If the object hasn't already been disposed of, calls {@link #disposeInternal}. Classes that extend {@code goog.Disposable} should override {@link #disposeInternal} in order to delete references to COM objects, DOM nodes, and other disposable objects. Reentrant.
void
}
.disposeInternal()
[protected]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()
Gets the dependencies of this module.
Array
.<string
>}
.getDisposed
[deprecated]Deprecated. Use {@link #isDisposed} instead.
Inherited from goog.Disposable
.
boolean
}
.getId()
Gets the ID of this module.
string
}
.getModule()
Gets the module.
goog.module.BaseModule
?}
.getUris()
Gets the uris of this module.
Array
.<string
>?}
.isDisposed()
Inherited from goog.Disposable
.
boolean
}
.isLoaded()
Determines whether the module has been loaded.
boolean
}
.onError(cause)
Calls the error callbacks for the module.
cause
{goog.module.ModuleManager.FailureType
}
.onLoad(contextProvider)
Sets this module as loaded.
contextProvider
{function
() : Object
}
boolean
}
.registerCallback(fn, opt_handler)
Registers a function that should be called after the module is loaded.
fn
{Function
}
opt_handler
{Object
=}
goog.module.ModuleLoadCallback
}
.registerDisposable(disposable)
Inherited from goog.Disposable
.
Associates a disposable object with this object so that they will be disposed together.
disposable
{goog.disposable.IDisposable
}
.registerEarlyCallback(fn, opt_handler)
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.
fn
{Function
}
opt_handler
{Object
=}
goog.module.ModuleLoadCallback
}
.registerErrback(fn, opt_handler)
Registers a function that should be called if the module load fails.
fn
{Function
}
opt_handler
{Object
=}
goog.module.ModuleLoadCallback
}
.setModuleConstructor(constructor)
Sets the constructor to use to instantiate the module object after the module code is loaded.
constructor
{Function
}
.setUris(uris)
Sets the uris of this module.
uris
{Array
.<string
>}