| Package | andromeda.ioc.factory |
| Class | public class ObjectConfig |
| Inheritance | ObjectConfig CoreObject |
Example :
import andromeda.ioc.factory.ECMAObjectFactory ;
import andromeda.ioc.factory.ObjectConfig ;
var factory:ECMAObjectFactory = ECMAObjectFactory.getInstance() ;
var config:ObjectConfig = new ObjectConfig() ;
config.defaultInitMethod = "init" ;
config.defaultDestroyMethod = "destroy" ;
config.identify = true ;
config.typeAliases = [ { alias:"CoreObject" , type:"vegas.core.CoreObject" } ] ;
config.typePolicy = TypePolicy.ALIAS ;
factory.config = config ;
trace( config ) ; // [ObjectConfig defaultDestroyMethod:destroy defaultInitMethod:init identify:true]
| Property | Defined by | ||
|---|---|---|---|
| config : Object
The config object reference used in the factory to register values and expressions.
| ObjectConfig | ||
| configEvaluator : ConfigEvaluator
[read-only]
Indicates the config evaluator reference.
| ObjectConfig | ||
| defaultDestroyMethod : String
The default name of destroy callback method to invoke with object definition in the ObjectFactory.
| ObjectConfig | ||
| defaultInitMethod : String
The default name of destroy callback method to invoke with object definition in the ObjectFactory.
| ObjectConfig | ||
| identify : Boolean
Indicates if the singleton objects in the ObjectFactory are identifiy if the type of the object implements the Identifiable interface.
| ObjectConfig | ||
| locale : Object
The locale object of the factory.
| ObjectConfig | ||
| localeEvaluator : LocaleEvaluator
[read-only]
Indicates the locale evaluator reference.
| ObjectConfig | ||
| lock : Boolean
Indicates if all the Lockable objects initialized in the object definitions in the factory must be locked during the invokation of this methods and the initialization of this properties.
| ObjectConfig | ||
| referenceEvaluator : ReferenceEvaluator
[read-only]
Indicates the reference evaluator object.
| ObjectConfig | ||
| root : *
The root reference of the application.
| ObjectConfig | ||
| throwError : Boolean
Indicates if the class throws errors or return null when an error is throwing.
| ObjectConfig | ||
| typeAliases : *
Determinates the typeAliases reference of this config object.
| ObjectConfig | ||
| typeEvaluator : TypeEvaluator
[read-only]
Indicates the type evaluator reference.
| ObjectConfig | ||
| typeExpression : *
Determinates the content of the typeExpression reference in this config object.
| ObjectConfig | ||
| typePolicy : String
Indicates the type policy of the object factory who use this configuration object.
| ObjectConfig | ||
| useLogger : Boolean = true
Indicates if the logger model is used in the IoC factory to log the warning and errors.
| ObjectConfig | ||
| Method | Defined by | ||
|---|---|---|---|
|
ObjectConfig(init:Object = null)
Creates a new ObjectConfig instance.
| ObjectConfig | ||
![]() |
Returns the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
hashCode():uint
Returns a hashcode value for the object.
| CoreObject | |
|
initialize(init:Object):void
Initialize the config object.
| ObjectConfig | ||
|
resetConfigTarget():void
Resets the target of the internal config dynamic object in this instance with a basic generic Object reference.
| ObjectConfig | ||
|
setConfigTarget(o:Object):void
This method is used to change the target of the internal config dynamic object.
| ObjectConfig | ||
|
setLocaleTarget(o:Object):void
This method is used to change the target of the internal local dynamic object.
| ObjectConfig | ||
![]() |
Sets the internal
ILogger reference of this ILogable object. | CoreObject | |
![]() |
toSource(indent:int = 0):String
Returns the string representation the source code of the object.
| CoreObject | |
|
toString():String
Returns the string representation of this instance.
| ObjectConfig | ||
| config | property |
config:Object [read-write]The config object reference used in the factory to register values and expressions.
Implementation public function get config():Object
public function set config(value:Object):void
| configEvaluator | property |
configEvaluator:ConfigEvaluator [read-only]Indicates the config evaluator reference.
Implementation public function get configEvaluator():ConfigEvaluator
| defaultDestroyMethod | property |
public var defaultDestroyMethod:StringThe default name of destroy callback method to invoke with object definition in the ObjectFactory.
| defaultInitMethod | property |
public var defaultInitMethod:StringThe default name of destroy callback method to invoke with object definition in the ObjectFactory.
| identify | property |
public var identify:BooleanIndicates if the singleton objects in the ObjectFactory are identifiy if the type of the object implements the Identifiable interface.
| locale | property |
locale:Object [read-write]The locale object of the factory. To evaluate locale expression in the object definitions.
Implementation public function get locale():Object
public function set locale(value:Object):void
| localeEvaluator | property |
localeEvaluator:LocaleEvaluator [read-only]Indicates the locale evaluator reference.
Implementation public function get localeEvaluator():LocaleEvaluator
| lock | property |
public var lock:BooleanIndicates if all the Lockable objects initialized in the object definitions in the factory must be locked during the invokation of this methods and the initialization of this properties.
| referenceEvaluator | property |
referenceEvaluator:ReferenceEvaluator [read-only]Indicates the reference evaluator object.
Implementation public function get referenceEvaluator():ReferenceEvaluator
| root | property |
public var root:*The root reference of the application. This property is optional and can be target in the IoC factory with the "ref" attribute with the value "#root".
| throwError | property |
throwError:Boolean [read-write]Indicates if the class throws errors or return null when an error is throwing.
Implementation public function get throwError():Boolean
public function set throwError(value:Boolean):void
| typeAliases | property |
typeAliases:* [read-write]Determinates the typeAliases reference of this config object.
The setter of this virtual property can be populated with a TypeAliases instance or an Array of typeAliases items.
This setter attribute don't remove the old TypeAliases instance but fill it with new aliases.
If you want cleanup the aliases of this configuration object you must use the typeAliases.clear() method.
The typeAliases items are generic objects with 2 attributes alias (the alias String expression) and type (the type String expression).
Example :
import andromeda.ioc.factory.ObjectConfig ;
var config:ObjectConfig = new ObjectConfig() ;
config.typeAliases =
[
{ alias:"CoreObject" , type:"vegas.core.CoreObject" }
] ;
Implementation
public function get typeAliases():*
public function set typeAliases(value:*):void
| typeEvaluator | property |
typeEvaluator:TypeEvaluator [read-only]Indicates the type evaluator reference.
Implementation public function get typeEvaluator():TypeEvaluator
| typeExpression | property |
typeExpression:* [read-write]Determinates the content of the typeExpression reference in this config object.
The setter of this virtual property can be populated with a TypeAliases instance or an Array of typeAliases items.
This setter attribute don't remove the old TypeAliases instance but fill it with new aliases.
If you want cleanup the aliases of this configuration object you must use the typeAliases.clear() method.
The typeAliases items are generic objects with 2 attributes alias (the alias String expression) and type (the type String expression).
Example :
import andromeda.ioc.factory.ObjectConfig ;
var config:ObjectConfig = new ObjectConfig() ;
config.typeAliases =
[
{ alias:"CoreObject" , type:"vegas.core.CoreObject" }
] ;
Implementation
public function get typeExpression():*
public function set typeExpression(value:*):void
| typePolicy | property |
typePolicy:String [read-write]
Indicates the type policy of the object factory who use this configuration object.
The default value of this attribute is TypePolicy.NONE.
You can use the TypePolicy.NONE, TypePolicy.ALL, TypePolicy.ALIAS, TypePolicy.EXPRESSION values./p>
Implementation
public function get typePolicy():String
public function set typePolicy(value:String):void
See also
| useLogger | property |
public var useLogger:Boolean = trueIndicates if the logger model is used in the IoC factory to log the warning and errors.
| ObjectConfig | () | constructor |
public function ObjectConfig(init:Object = null)Creates a new ObjectConfig instance.
Parametersinit:Object (default = null) — A generic object containing properties with which to populate the newly instance. If this argument is null, it is ignored.
|
| initialize | () | method |
public function initialize(init:Object):voidInitialize the config object.
Parametersinit:Object — A generic object containing properties with which to populate the newly instance. If this argument is null, it is ignored.
|
| resetConfigTarget | () | method |
public function resetConfigTarget():voidResets the target of the internal config dynamic object in this instance with a basic generic Object reference.
| setConfigTarget | () | method |
public function setConfigTarget(o:Object):voidThis method is used to change the target of the internal config dynamic object.
Parameterso:Object |
| setLocaleTarget | () | method |
public function setLocaleTarget(o:Object):voidThis method is used to change the target of the internal local dynamic object.
Parameterso:Object |
| toString | () | method |
public override function toString():StringReturns the string representation of this instance.
ReturnsString — the string representation of this instance.
|