Packageorg.swizframework.core
Classpublic class BeanFactory
InheritanceBeanFactory Inheritance flash.events.EventDispatcher
Implements IBeanFactory

Bean Factory



Public Properties
 PropertyDefined By
  beans : Array
[read-only]
BeanFactory
  parentBeanFactory : IBeanFactory
BeanFactory
Protected Properties
 PropertyDefined By
  _beans : Array
BeanFactory
  logger : SwizLogger
BeanFactory
  _parentBeanFactory : IBeanFactory
BeanFactory
  swiz : ISwiz
BeanFactory
Public Methods
 MethodDefined By
  
Constructor
BeanFactory
  
addBean(bean:Bean, autoSetUpBean:Boolean = true):Bean
BeanFactory
  
addBeanProvider(beanProvider:IBeanProvider, autoSetUpBeans:Boolean = true):void
BeanFactory
  
constructBean(obj:*, name:String, domain:ApplicationDomain):Bean
[static]
BeanFactory
  
createBeanFromSource(source:Object, beanName:String = null):Bean
BeanFactory
  
getBeanByName(name:String):Bean
BeanFactory
  
getBeanByType(beanType:Class):Bean
BeanFactory
  
getBeanForSource(source:Object):Bean
BeanFactory
  
removeBean(bean:Bean):void
BeanFactory
  
BeanFactory
  
setUp(swiz:ISwiz):void
BeanFactory
  
setUpBean(bean:Bean):void
Initialze Bean
BeanFactory
  
tearDown():void
BeanFactory
  
tearDownBean(bean:Bean):void
Tear down the specified Bean, or any bean with the same source, and remove it from the cache.
BeanFactory
Protected Methods
 MethodDefined By
  
Handle bean set up and tear down events.
BeanFactory
  
isPotentialInjectionTarget(instance:Object):Boolean
Evaluate whether Swiz is configured such that the specified class is a potential injection target.
BeanFactory
  
setUpEventHandler(event:Event):void
Injection Event Handler
BeanFactory
  
setUpEventHandlerSysMgr(event:Event):void
Injection Event Handler defined on SysMgr
BeanFactory
  
tearDownEventHandler(event:Event):void
Remove Event Handler
BeanFactory
Protected Constants
 ConstantDefined By
  ignoredClasses : RegExp
BeanFactory
Property Detail
_beansproperty
protected var _beans:Array

_parentBeanFactoryproperty 
protected var _parentBeanFactory:IBeanFactory

beansproperty 
beans:Array  [read-only]


Implementation
    public function get beans():Array
loggerproperty 
protected var logger:SwizLogger

parentBeanFactoryproperty 
parentBeanFactory:IBeanFactory


Implementation
    public function get parentBeanFactory():IBeanFactory
    public function set parentBeanFactory(value:IBeanFactory):void
swizproperty 
protected var swiz:ISwiz

Constructor Detail
BeanFactory()Constructor
public function BeanFactory()

Constructor

Method Detail
addBean()method
public function addBean(bean:Bean, autoSetUpBean:Boolean = true):Bean

Parameters

bean:Bean
 
autoSetUpBean:Boolean (default = true)

Returns
Bean
addBeanProvider()method 
public function addBeanProvider(beanProvider:IBeanProvider, autoSetUpBeans:Boolean = true):void

Parameters

beanProvider:IBeanProvider
 
autoSetUpBeans:Boolean (default = true)

constructBean()method 
public static function constructBean(obj:*, name:String, domain:ApplicationDomain):Bean

Parameters

obj:*
 
name:String
 
domain:ApplicationDomain

Returns
Bean
createBeanFromSource()method 
public function createBeanFromSource(source:Object, beanName:String = null):Bean

Parameters

source:Object
 
beanName:String (default = null)

Returns
Bean
getBeanByName()method 
public function getBeanByName(name:String):Bean

Parameters

name:String

Returns
Bean
getBeanByType()method 
public function getBeanByType(beanType:Class):Bean

Parameters

beanType:Class

Returns
Bean
getBeanForSource()method 
public function getBeanForSource(source:Object):Bean

Parameters

source:Object

Returns
Bean
handleBeanEvent()method 
protected function handleBeanEvent(event:BeanEvent):void

Handle bean set up and tear down events.

Parameters

event:BeanEvent

isPotentialInjectionTarget()method 
protected function isPotentialInjectionTarget(instance:Object):Boolean

Evaluate whether Swiz is configured such that the specified class is a potential injection target.

Parameters

instance:Object

Returns
Boolean
removeBean()method 
public function removeBean(bean:Bean):void

Parameters

bean:Bean

removeBeanProvider()method 
public function removeBeanProvider(beanProvider:IBeanProvider):void

Parameters

beanProvider:IBeanProvider

setUp()method 
public function setUp(swiz:ISwiz):void

Parameters

swiz:ISwiz

setUpBean()method 
public function setUpBean(bean:Bean):void

Initialze Bean

Parameters

bean:Bean

setUpEventHandler()method 
protected function setUpEventHandler(event:Event):void

Injection Event Handler

Parameters

event:Event

setUpEventHandlerSysMgr()method 
protected function setUpEventHandlerSysMgr(event:Event):void

Injection Event Handler defined on SysMgr

Parameters

event:Event

tearDown()method 
public function tearDown():void

tearDownBean()method 
public function tearDownBean(bean:Bean):void

Tear down the specified Bean, or any bean with the same source, and remove it from the cache.

Parameters

bean:Bean

tearDownEventHandler()method 
protected function tearDownEventHandler(event:Event):void

Remove Event Handler

Parameters

event:Event

Constant Detail
ignoredClassesConstant
protected const ignoredClasses:RegExp