[JSDoc] Add annotations

Bulk-add JSDoc annotations, WTD-1482.
This commit is contained in:
Victor Woeltjen
2015-08-07 11:44:54 -07:00
parent 14f97eae9c
commit c08a460d30
239 changed files with 939 additions and 185 deletions

View File

@ -47,4 +47,4 @@ define({
"mandatory": Number.POSITIVE_INFINITY
},
DEFAULT_PRIORITY: 0
});
});

View File

@ -38,6 +38,7 @@ define(
* * Registering extensions with Angular
* * Bootstrapping the Angular application.
*
* @memberof platform/framework
* @constructor
* @param {BundleLoader} loader
* @param {BundleResolver} resolver
@ -59,4 +60,4 @@ define(
return FrameworkInitializer;
}
);
);

View File

@ -47,6 +47,7 @@ define(
* as a default. Only log messages of levels equal to or greater
* than the specified level will be passed to console.
*
* @memberof platform/framework
* @constructor
* @param {string} level the logging level
*/
@ -83,6 +84,7 @@ define(
*
* @param app the Angular app to configure
* @param $log Angular's $log (also configured)
* @memberof platform/framework.LogLevel#
*/
configure: function (app, $log) {
decorate($log);
@ -98,4 +100,4 @@ define(
return LogLevel;
}
);
);

View File

@ -129,4 +129,4 @@ define(
requirejs.config({ "baseUrl": "" });
injector.invoke(['$http', '$log', initializeApplication]);
}
);
);

View File

@ -38,6 +38,7 @@ define(
* framework needs to wait until all extensions have been loaded
* and registered.
*
* @memberof platform/framework
* @constructor
*/
function ApplicationBootstrapper(angular, document, $log) {
@ -49,6 +50,7 @@ define(
* @memberof ApplicationBootstrapper#
* @param {angular.Module} app the Angular application to
* bootstrap
* @memberof platform/framework.ApplicationBootstrapper#
*/
bootstrap: function (app) {
$log.info("Bootstrapping application " + (app || {}).name);
@ -61,4 +63,4 @@ define(
return ApplicationBootstrapper;
}
);
);

View File

@ -38,6 +38,8 @@ define(
* contains resource files used by this bundle
* @property {Object.<string,ExtensionDefinition[]>} [extensions={}]
* all extensions exposed by this bundle
* @constructor
* @memberof platform/framework
*/
@ -84,6 +86,7 @@ define(
* Get the path to this bundle.
* @memberof Bundle#
* @returns {string}
* @memberof platform/framework.Bundle#
*/
getPath: function () {
return path;
@ -97,6 +100,7 @@ define(
* @param {string} [sourceFile] optionally, give a path to
* a specific source file in the bundle.
* @returns {string}
* @memberof platform/framework.Bundle#
*/
getSourcePath: function (sourceFile) {
var subpath = sourceFile ?
@ -114,6 +118,7 @@ define(
* @param {string} [resourceFile] optionally, give a path to
* a specific resource file in the bundle.
* @returns {string}
* @memberof platform/framework.Bundle#
*/
getResourcePath: function (resourceFile) {
var subpath = resourceFile ?
@ -131,6 +136,7 @@ define(
* @param {string} [libraryFile] optionally, give a path to
* a specific library file in the bundle.
* @returns {string}
* @memberof platform/framework.Bundle#
*/
getLibraryPath: function (libraryFile) {
var subpath = libraryFile ?
@ -145,6 +151,7 @@ define(
* it will resemble a require.config object.
* @memberof Bundle#
* @returns {object}
* @memberof platform/framework.Bundle#
*/
getConfiguration: function () {
return definition.configuration || {};
@ -155,6 +162,7 @@ define(
* bundle) and the name (human-readable name for this
* bundle.)
* @returns {string} log-friendly name for this bundle
* @memberof platform/framework.Bundle#
*/
getLogName: function () {
return logName;
@ -166,6 +174,7 @@ define(
* @param category
* @memberof Bundle#
* @returns {Array}
* @memberof platform/framework.Bundle#
*/
getExtensions: function (category) {
var extensions = definition.extensions[category] || [];
@ -180,6 +189,7 @@ define(
*
* @memberof Bundle#
* @returns {Array}
* @memberof platform/framework.Bundle#
*/
getExtensionCategories: function () {
return Object.keys(definition.extensions);
@ -190,6 +200,7 @@ define(
*
* @memberof Bundle#
* @returns {BundleDefinition} the raw definition of this bundle
* @memberof platform/framework.Bundle#
*/
getDefinition: function () {
return definition;
@ -201,4 +212,4 @@ define(
return Bundle;
}
);
);

View File

@ -39,6 +39,7 @@ define(
* useful to the framework. This provides the base information which
* will be used by later phases of framework layer initialization.
*
* @memberof platform/framework
* @constructor
* @param {object} $http Angular's HTTP requester
* @param {object} $log Angular's logging service
@ -120,6 +121,7 @@ define(
* @param {string|string[]} an array of bundle names to load, or
* the name of a JSON file containing that array
* @returns {Promise.<Bundle[]>}
* @memberof platform/framework.BundleLoader#
*/
loadBundles: loadBundles
};
@ -127,4 +129,4 @@ define(
return BundleLoader;
}
);
);

View File

@ -38,6 +38,8 @@ define(
* @property {string[]} [depends=[]] the dependencies needed by this
* extension; these are strings as shall be passed to
* Angular's dependency resolution mechanism.
* @constructor
* @memberof platform/framework
*/
/**
@ -81,6 +83,7 @@ define(
* Get the machine-readable identifier for this extension.
*
* @returns {string}
* @memberof platform/framework.Extension#
*/
getKey: function () {
return definition.key || "undefined";
@ -90,6 +93,7 @@ define(
*
* @memberof Extension#
* @returns {Bundle}
* @memberof platform/framework.Extension#
*/
getBundle: function () {
return bundle;
@ -100,6 +104,7 @@ define(
*
* @memberof Extension#
* @returns {string}
* @memberof platform/framework.Extension#
*/
getCategory: function () {
return category;
@ -111,6 +116,7 @@ define(
*
* @returns {boolean} true if an implementation separate
* from this definition should also be loaded
* @memberof platform/framework.Extension#
*/
hasImplementation: function () {
return definition.implementation !== undefined;
@ -122,6 +128,7 @@ define(
*
* @memberof Extension#
* @returns {string} path to implementation, or undefined
* @memberof platform/framework.Extension#
*/
getImplementationPath: function () {
return definition.implementation ?
@ -134,6 +141,7 @@ define(
* extension) and the name (human-readable name for this
* extension.)
* @returns {string} log-friendly name for this extension
* @memberof platform/framework.Extension#
*/
getLogName: function () {
return logName;
@ -149,6 +157,7 @@ define(
* @returns {ExtensionDefinition} the plain definition of
* this extension, as read from the bundle
* declaration.
* @memberof platform/framework.Extension#
*/
getDefinition: function () {
return extensionDefinition;
@ -160,4 +169,4 @@ define(
return Extension;
}
);
);

View File

@ -33,6 +33,7 @@ define(
* Handles registration of a few specific extension types that are
* understood natively by Angular. This includes services and
* directives.
* @memberof platform/framework
* @constructor
*/
function CustomRegistrars(app, $log) {
@ -164,4 +165,4 @@ define(
return CustomRegistrars;
}
);
);

View File

@ -32,6 +32,7 @@ define(
/**
* Responsible for registering extensions with Angular.
*
* @memberof platform/framework
* @constructor
* @param {angular.Module} the Angular application with which
* extensions should be registered
@ -215,6 +216,7 @@ define(
* extensions
* @returns {angular.Module} the application module with
* which extensions were registered
* @memberof platform/framework.ExtensionRegistrar#
*/
registerExtensions: registerExtensionGroup
};
@ -222,4 +224,4 @@ define(
return ExtensionRegistrar;
}
);
);

View File

@ -34,6 +34,7 @@ define(
* specify symbolic properties as strings (instead of numbers),
* which will be looked up from the table `Constants.PRIORITY_LEVELS`.
* @param $log Angular's logging service
* @memberof platform/framework
* @constructor
*/
function ExtensionSorter($log) {
@ -103,6 +104,7 @@ define(
*
* @param {object[]} extensions array of resolved extensions
* @returns {object[]} the same extensions, in priority order
* @memberof platform/framework.ExtensionSorter#
*/
sort: function (extensions) {
return (extensions || [])
@ -115,4 +117,4 @@ define(
return ExtensionSorter;
}
);
);

View File

@ -43,6 +43,7 @@ define(
* instantiate instances of these extensions by passing only
* those per-instance arguments.
*
* @memberof platform/framework
* @constructor
*/
function PartialConstructor(Constructor) {
@ -76,4 +77,4 @@ define(
return PartialConstructor;
}
);
);

View File

@ -33,6 +33,7 @@ define(
* Handles service compositing; that is, building up services
* from provider, aggregator, and decorator components.
*
* @memberof platform/framework
* @constructor
*/
function ServiceCompositor(app, $log) {
@ -221,6 +222,7 @@ define(
* method may not behave as expected.
*
* @param {Array} components extensions of category component
* @memberof platform/framework.ServiceCompositor#
*/
registerCompositeServices: registerCompositeServices
};
@ -228,4 +230,4 @@ define(
return ServiceCompositor;
}
);
);

View File

@ -34,6 +34,7 @@ define(
* initialization. During this phase, any scripts implementing
* extensions provided by bundles are loaded.
*
* @memberof platform/framework
* @constructor
*/
function BundleResolver(extensionResolver, requireConfigurator, $log) {
@ -47,6 +48,7 @@ define(
*
* @param {Object.<string, object[]>|Array} resolvedBundles
* @returns {Object.<string, object[]>}
* @memberof platform/framework.BundleResolver#
*/
function mergeResolvedBundles(resolvedBundles) {
var result = {};
@ -107,6 +109,7 @@ define(
* key-value pairs, where keys are extension
* categories and values are arrays of resolved
* extensions belonging to those categories
* @memberof platform/framework.BundleResolver#
*/
resolveBundles: function (bundles) {
// First, make sure Require is suitably configured
@ -121,4 +124,4 @@ define(
return BundleResolver;
}
);
);

View File

@ -35,6 +35,7 @@ define(
*
* @param {ImplementationLoader} loader used to load implementations
* @param {*} $log Angular's logging service
* @memberof platform/framework
* @constructor
*/
function ExtensionResolver(loader, $log) {
@ -111,6 +112,7 @@ define(
* will additionally be attached to any loaded implementation.
*
* @param {Extension} extension
* @memberof platform/framework.ExtensionResolver#
*/
resolve: function (extension) {
// Log that loading has begun
@ -128,4 +130,4 @@ define(
return ExtensionResolver;
}
);
);

View File

@ -33,6 +33,7 @@ define(
* Responsible for loading extension implementations
* (AMD modules.) Acts as a wrapper around RequireJS to
* provide a promise-like API.
* @memberof platform/framework
* @constructor
* @param {*} require RequireJS, or an object with similar API
* @param {*} $log Angular's logging service
@ -57,6 +58,7 @@ define(
* @memberof ImplementationLoader#
* @param {string} path the path to the module to load
* @returns {Promise} a promise for the specified module.
* @memberof platform/framework.ImplementationLoader#
*/
load: loadModule
};
@ -64,4 +66,4 @@ define(
return ImplementationLoader;
}
);
);

View File

@ -30,6 +30,7 @@ define(
* Handles configuration of RequireJS to expose libraries
* from bundles with module names that can be used from other
* bundles.
* @memberof platform/framework
* @constructor
* @param requirejs an instance of RequireJS
*/
@ -99,6 +100,7 @@ define(
*
* @param {Bundle[]} the bundles to include in this
* configuration
* @memberof platform/framework.RequireConfigurator#
*/
configure: function (bundles) {
return requirejs.config(buildConfiguration(bundles));
@ -109,4 +111,4 @@ define(
return RequireConfigurator;
}
);
);