base-debug.js revision cc05f14a87293a437bcbe67deac2da7edad2a120
6f294bea19c397d53e471007448460655f4b8c6bTripp* Base class support for objects requiring managed attributes and acting as event targets.
6f294bea19c397d53e471007448460655f4b8c6bTripp* The base module also provides an augmentable PluginHost interface.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp* @module base
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * An augmentable class, which when added to a "Base" based class, allows
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * the class to support Plugins, providing plug and unplug methods.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * The PlugHost's _initPlugins and _destroyPlugins should be invoked by the
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * host class at the appropriate point in the classes lifecyle. This is done
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * by default for Base class.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @class PluginHost
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Register and instantiate a plugin with the Widget.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method plug
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @chainable
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param p {Function | Object |Array} Accepts the plugin class, or an
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * object literal with a "fn" property specifying the Plugin class and
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * a "cfg" property specifying the configuration for the Plugin.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Additionally an Array can also be passed in, with the above function or
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Object literal values, allowing for multiple plugin registration in a single call.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param config Optional. If the first argument is the plugin class, the second argument
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * can be the configuration for the plugin.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp } else if (L.isArray(p)) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp this.plug(p[i]);
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp return this;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Unregister and destroy a plugin already instantiated on the host.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method unplug
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {String | Function} plugin The namespace of the Plugin, or the Plugin class with the static NS namespace property defined. If not provided,
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * all registered plugins are unplugged.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @chainable
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp return this;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Determines if a plugin has been registered and instantiated
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * for this widget.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method hasPlugin
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @return {Boolean} returns true, if the plugin has been applied
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * to this widget.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Initializes static plugins registered on the host (using the
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Base.plug static method) and any plugins passed in for the
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * instance through the "plugins" configuration property.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _initPlugins
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Config} the user configuration object for the host.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // Class Configuration
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp constructor, i, classPlug, classUnplug, pluginClassName;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp //TODO: Room for optimization. Can we apply statically/unplug in same pass?
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // subclasses over-write
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // subclasses over-write
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // User Configuration
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Private method used to unplug and destroy all plugins on the host
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _destroyPlugins
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp _destroyPlugins: function() {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Private method used to instantiate and attach plugins to the host
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _plug
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Function} PluginClass The plugin class to instantiate
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Object} config The configuration object for the plugin
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // Update config
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // Create new instance
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Private method used to unregister and destroy a plugin already instantiated with the host.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _unplug
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {String | Function} plugin The namespace for the Plugin, or a Plugin class, with the static NS property defined.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if (this[ns]) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp delete this[ns];
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Registers plugins to be instantiated at the class level (plugins
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * which should be plugged into every instance of the class by default).
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method PluginHost.plug
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Function} hostClass The host class on which to register the plugins
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Function | Array} plugin Either the plugin class, or an array of plugin classes/plugin fn, cfg object literals
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * @param {Object} config If plugin is the plugin class, the configuration for the plugin can be passed
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * as the configuration for the plugin
8215dd9a19d775d6391d4f44be2ca8268952e048TrippPluginHost.plug = function(hostClass, plugin, config) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // Cannot plug into Base, since Plugins derive from Base [ will cause infinite recurrsion ]
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp var p, i, l, name;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Unregisters plugins which have been registered by the host class, or any
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * other class in the hierarchy.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method PluginHost.unplug
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Function} hostClass The host class from which to unregister the plugins
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Function | Array} plugin The plugin class, or an array of plugin classes
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp var p, i, l, name;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Base class support for objects requiring managed attributes and acting as event targets.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * The base module also provides an augmentable PluginHost interface.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @module base
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * The base-base sub-module provides the Base class, without Base.build functionality
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @module base
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @sub-module base-base
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp var O = Y.Object,
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Provides a base class for managed attribute based
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * objects, which handles the chaining of initializer and destructor methods
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * across the hierarchy during init and destroy lifecycle methods and
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * handles automatic configuration of registered Attributes, through
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * the static <a href="#property_ATTRS">ATTRS</a> property.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * <p>The Base class also handles prefixing of event types with the static <a href="#property_NAME">NAME</a>
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * property for all events fired from instances of classes derived from Base.</p>
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @constructor
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @class Base
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @uses Attribute, Plugin.Host
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Object} config Object literal of configuration property name/value pairs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp function Base() {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if (this._lazyAddAttrs !== false) { this._lazyAddAttrs = true; }
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * The list of properties which can be configured for
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * each attribute (e.g. setter, getter, writeOnce etc.)
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @property Base._ATTR_CFG
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @type Array
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp Base._ATTR_CFG = Y.Attribute._ATTR_CFG.concat("cloneDefaultValue");
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Name string to be used to identify instances of
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * this class, for example in prefixing events.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Classes extending Base, should define their own
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * static NAME property.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @property NAME
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @type String
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Object literal defining the set of attributes which
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * will be available for instances of this class, and
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * how they are configured. See Attributes addAtt method
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * for a description of configuration options available
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * for each attribute.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @property ATTRS
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @type Object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Flag indicating whether or not this object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * has been through the init lifecycle phase.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @attribute initialized
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @readOnly
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @default false
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @type boolean
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Flag indicating whether or not this object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * has been through the destroy lifecycle phase.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @attribute destroyed
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @readOnly
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @default false
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @type boolean
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Init lifecycle method, invoked during construction.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Fires the init event prior to invoking initializers on
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * the class hierarchy.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method init
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @chainable
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Object} config Object literal of configuration property name/value pairs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @return {Base} A reference to this object
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * The name string to be used to identify
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * this instance of object.
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * @property name
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * @type String
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp this._yuievt.config.prefix = this.name = this.constructor.NAME;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Lifecycle event for the init phase, fired prior to initialization.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Invoking the preventDefault method on the event object provided
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * to subscribers will prevent initialization from occuring.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Subscribers to the "after" momemt of this event, will be notified
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * after initialization of the object is complete (and therefore
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * cannot prevent initialization).
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @event init
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @preventable _defInitFn
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Event.Facade} e Event object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param config Object literal of configuration name/value pairs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if (!this._silentInit) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if (!this._silentInit) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp return this;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Destroy lifecycle method. Fires the destroy
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * event, prior to invoking destructors for the
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * class hierarchy.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Subscribers to the destroy
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * event can invoke preventDefault on the event object, to prevent destruction
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * from proceeding.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method destroy
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @return {Base} A reference to this object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @chainable
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp destroy: function() {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Lifecycle event for the destroy phase,
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * fired prior to destruction. Invoking the preventDefault
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * method on the event object provided to subscribers will
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * prevent destruction from proceeding.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Subscribers to the "after" moment of this event, will be notified
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * after destruction is complete (and as a result cannot prevent
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * destruction).
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @event destroy
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @preventable _defDestroyFn
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Event.Facade} e Event object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp return this;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Default init event handler
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _defInitFn
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Event.Facade} e Event object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @protected
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp _defInitFn : function(e) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if (!this._silentInit) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Default destroy event handler
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _defDestroyFn
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Event.Facade} e Event object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @protected
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp _defDestroyFn : function(e) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Returns the class hierarchy for this object, with Base being the last class in the array.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _getClasses
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @protected
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @return {Function[]} An Array of classes (constructor functions), making up the class hierarchy for this object
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp _getClasses : function() {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if (!this._classes) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp return this._classes;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Returns an aggregated set of attribute configurations, by traversing the class hierarchy.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _getAttrCfgs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @protected
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @return {Object} The hash of attribute configurations, aggregated across classes in the hierarchy
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp _getAttrCfgs : function() {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if (!this._attrs) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp return this._attrs;
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _filterAttrCfs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Function} clazz
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Objects} allCfgs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _initHierarchyData
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp _initHierarchyData : function() {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp var c = this.constructor,
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp while (c) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // Add to classes
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // Add to attributes
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @method _aggregateAttrs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * @param {Object} allAttrs
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // Protect config passed in
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp if ( (clone === undefined && (OBJECT_CONSTRUCTOR === val.constructor || L.isArray(val))) || clone === DEEP || clone === true) {
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp Y.log('Cloning default value for attribute:' + attr, 'info', 'base');
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp Y.log('Merging default value for attribute:' + attr, 'info', 'base');
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // else if (clone === false), don't clone the static default value.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp // It's intended to be used by reference.
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp } else if (!path){
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * Initializes the class hierarchy rooted at this base class,
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * which includes initializing attributes for each class defined
8215dd9a19d775d6391d4f44be2ca8268952e048Tripp * in the class's static <a href="#property_ATTRS">ATTRS</a> property and invoking the initializer
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * method on the prototype of each class in the hierarchy.
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * @method _initHierarchy
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * @param {Object} userVals Object literal containing attribute name/value pairs
6f294bea19c397d53e471007448460655f4b8c6bTripp if (constr._yuibuild && constr._yuibuild.exts && !constr._yuibuild.dynamic) {
6f294bea19c397d53e471007448460655f4b8c6bTripp for (ei = 0, el = constr._yuibuild.exts.length; ei < el; ei++) {
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp this.addAttrs(this._filterAttrCfgs(constr, attrCfgs), userVals, lazy);
6f294bea19c397d53e471007448460655f4b8c6bTripp * Destroys the class hierarchy rooted at this base class by invoking
6f294bea19c397d53e471007448460655f4b8c6bTripp * the descructor method on the prototype of each class in the hierarchy.
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp * @method _destroyHierarchy
f943c7186e37311877b6a9cf880bb405c09e2c9dTripp _destroyHierarchy : function() {
toString: function() {
L = Y.Lang;
* augmented/aggregated to the built class.
if (dynamic) {
if (aggregates) {
if (aggregates) {
if (dynamic) {
return builtClass;
function BuiltClass() {
l = f.length,
return BuiltClass;
l = f.length,
if (f[i] === extClass) {
id: null,
exts : [],
return builtClass;
var aggr = [],
c = main,
while (c && c.prototype) {
if (classAggr) {
if (cfgAggr) {
return aggr;