| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
The BuildFactory class store command to build objects of different
types.
Each command is associated with targeted object type to build.
When an object with type definition is find, check if a command exist,
if yes, command is executed to build correct object instance.
Defaults commands are already implemented in LowRA core, take a look
at com.bourre.ioc.control
package.
protected function addType(type:String, build:Command):void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Adds new builder command for passed-in type of object.
Parameters
| type:String — Type of object to monitor
|
| |
| build:Command — Command to execute to build object of passed-in type
|
public function build(constructor:Constructor, id:String = null):*
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Builds object using passed-in Constructor definition.
Parameters
| constructor:Constructor — Contructor definition to build correct instance
|
| |
| id:String (default = null) — (optional) if not null, built object
is registered in the BeanFactory store.
|
Returns
public static function getInstance():BuildFactory
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns singleton instance of BuildFactory.
Returns
public function init():void
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Inits builder hashmap with default builder instances defined
in LowRA core.
See also
public function toString():String
| Player version: | Flash Player 9.0 |
| Language version: | ActionScript 3.0 |
Returns the string representation of this instance.
Returns
| String — the string representation of this instance
|
LowRA API documentation 2008- 2009
Licensed under the MOZILLA PUBLIC LICENSE, Version 1.1
mer. févr. 25 2009, 9:22 AM GMT+01:00