Packagecom.bourre.ioc.control
Classpublic class BuildFactory

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.

See also

LowRA builder commands


Public Methods
 MethodDefined by
  
build(constructor:Constructor, id:String = null):*
Builds object using passed-in Constructor definition.
BuildFactory
  
[static] Returns singleton instance of BuildFactory.
BuildFactory
  
init():void
Inits builder hashmap with default builder instances defined in LowRA core.
BuildFactory
  
toString():String
Returns the string representation of this instance.
BuildFactory
Protected Methods
 MethodDefined by
  
addType(type:String, build:Command):void
Adds new builder command for passed-in type of object.
BuildFactory
Method detail
addType()method
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
build()method 
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
* — Built object
getInstance()method 
public static function getInstance():BuildFactory

Player version: Flash Player 9.0
Language version: ActionScript 3.0

Returns singleton instance of BuildFactory.

Returns
BuildFactory — The singleton instance of BuildFactory
init()method 
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

toString()method 
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