lib/component.js
function Component(id, mod, asm) {
  var keys, i, len;
  
  this.id = id;
  this.dependencies = mod['@require'] || [];
  this.singleton = mod['@singleton'];
  this.implements = mod['@implements'] || [];
  if (typeof this.implements == 'string') {
    this.implements = [ this.implements ]
  }
  this.a = {};
  
  if (typeof mod === 'object' || typeof mod === 'function') {
    keys = Object.keys(mod);
    for (i = 0, len = keys.length; i < len; ++i) {
      if (keys[i].indexOf('@') == 0) {
        this.a[keys[i]] = mod[keys[i]];
      }
    }
  }
  this._assembly = asm;
}
function Component(id, mod, asm) {
  var keys, i, len;
  
  this.id = id;
  this.dependencies = mod['@require'] || [];
  this.singleton = mod['@singleton'];
  this.implements = mod['@implements'] || [];
  if (typeof this.implements == 'string') {
    this.implements = [ this.implements ]
  }
  this.a = {};
  
  if (typeof mod === 'object' || typeof mod === 'function') {
    keys = Object.keys(mod);
    for (i = 0, len = keys.length; i < len; ++i) {
      if (keys[i].indexOf('@') == 0) {
        this.a[keys[i]] = mod[keys[i]];
      }
    }
  }
  this._assembly = asm;
}
function Component ( id , mod , asm ) { var keys , i , len ; this . id = id ; this . dependencies = mod [ '@require' ] || [ ] ; this . singleton = mod [ '@singleton' ] ; this . implements = mod [ '@implements' ] || [ ] ; if ( typeof this . implements == 'string' ) { this . implements = [ this . implements ] } this . a = { } ; if ( typeof mod === 'object' || typeof mod === 'function' ) { keys = Object . keys ( mod ) ; for ( i = 0 , len = keys . length ; i < len ; ++ i ) { if ( keys [ i ] . indexOf ( '@' ) == 0 ) { this . a [ keys [ i ] ] = mod [ keys [ i ] ] ; } } } this . _assembly = asm ; }
A specification of an object.

A specification defines how an object is created.  The specification includes
a "factory" which is used to create objects.  A factory is typically a
function which returns the object or a constructor that is invoked with the
`new` operator.  A specification also declares any objects required by the
object.  Any such required objects will be injected into the object when it
is created.

A specification also contains annotations, which are used by the IoC
container when creating an object.   These annotations are:

- `@require` - Declares other objects needed by this object.
- `@singleton` - Declares whether or not a single instance of this object
should be created.
- `@implements` - Declares the interfaces implemented by this object.

A specification may contain other annotations, and the complete set of
annotations is available under the `.a` hash (short for annotations).  Such
annotations are typically used by higher-level frameworks for purposes such
as declaring service endpoints and loading plug-ins.

@constructor
@param {string} id - The id of the component.
@param {object} mod - The module containing the component specification.
@param {number} asm - The assembly from which the component was loaded.
@protected
A specification of an object .