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

Bean Factory



Public Properties
 PropertyDefined By
  beans : Array
[read-only] BeanFactories will pull all beans from BeanProviders into a local cache.
BeanFactory
  parentBeanFactory : IBeanFactory
BeanFactory
Protected Properties
 PropertyDefined By
  _beans : Array
Backing variable for beans getter/setter.
BeanFactory
  logger : SwizLogger
BeanFactory
  _parentBeanFactory : IBeanFactory
BeanFactory
  swiz : ISwiz
BeanFactory
  typeDescriptors : Dictionary
BeanFactory
Public Methods
 MethodDefined By
  
Constructor
BeanFactory
  
constructBean(obj:*, name:String, domain:ApplicationDomain):Bean
[static]
BeanFactory
  
getBeanByName(name:String):Bean
BeanFactory
  
getBeanByType(beanType:Class):Bean
BeanFactory
  
init(swiz:ISwiz):void
Called by Swiz
BeanFactory
  
setUpBean(bean:Bean):void
Initialze Bean
BeanFactory
  
setUpBeans():void
Initializes all beans in the beans cache.
BeanFactory
  
tearDownBean(bean:Bean):void
Remove Bean
BeanFactory
  
BeanFactory
Protected Methods
 MethodDefined By
  
addBeanProviders(beanProviders:Array):void
Add Bean Providers
BeanFactory
  
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

Backing variable for beans getter/setter.

_parentBeanFactoryproperty 
protected var _parentBeanFactory:IBeanFactory

beansproperty 
beans:Array  [read-only]

BeanFactories will pull all beans from BeanProviders into a local cache.


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

typeDescriptorsproperty 
protected var typeDescriptors:Dictionary

Constructor Detail
BeanFactory()Constructor
public function BeanFactory()

Constructor

Method Detail
addBeanProviders()method
protected function addBeanProviders(beanProviders:Array):void

Add Bean Providers

Parameters

beanProviders:Array

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

Parameters

obj:*
 
name:String
 
domain:ApplicationDomain

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
handleBeanEvent()method 
protected function handleBeanEvent(event:BeanEvent):void

Parameters

event:BeanEvent

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

Called by Swiz

Parameters

swiz:ISwiz

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
setUpBean()method 
public function setUpBean(bean:Bean):void

Initialze Bean

Parameters

bean:Bean

setUpBeans()method 
public function setUpBeans():void

Initializes all beans in the beans cache.

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

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

Remove Bean

Parameters

bean:Bean

tearDownBeans()method 
public function tearDownBeans():void

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

Remove Event Handler

Parameters

event:Event

Constant Detail
ignoredClassesConstant
protected const ignoredClasses:RegExp