| Package | org.springextensions.actionscript.ioc.factory.xml |
| Class | public class XMLObjectFactory |
| Inheritance | XMLObjectFactory DefaultListableObjectFactory AbstractObjectFactory flash.events.EventDispatcher |
| Implements | IXMLObjectFactory |
| Subclasses | XMLApplicationContext |
| Property | Defined by | ||
|---|---|---|---|
![]() | allowObjectDefinitionOverriding : Boolean
Whether to allow re-registration of a different definition with the same name
| DefaultListableObjectFactory | |
| configLocations : Array [read-only]
Returns an array of configuration locations.
| XMLObjectFactory | ||
![]() | numObjectDefinitions : int
Returns the number of definitions present in the object definition registry
| DefaultListableObjectFactory | |
![]() | numObjectPostProcessors : int
Returns the number of object post processors.
| AbstractObjectFactory | |
![]() | objectDefinitionNames : Array
Returns an array containing all object definition names.
| DefaultListableObjectFactory | |
| parser : XMLObjectDefinitionsParser
Contains the parser of the XML definitions.
| XMLObjectFactory | ||
![]() | typeConverter : ITypeConverter
The current type converter implementation
| AbstractObjectFactory | |
| Method | Defined by | ||
|---|---|---|---|
|
XMLObjectFactory(source:* = null)
Creates a new XmlObjectFactory
| XMLObjectFactory | ||
|
addConfig(config:XML):void
Use this method to add xml versions of configurations
| XMLObjectFactory | ||
|
addConfigLocation(configLocation:String):void
Use this method to add aditional configuration locations.
| XMLObjectFactory | ||
|
addEmbeddedConfig(config:Class):void
Adds an embedded config.
| XMLObjectFactory | ||
![]() |
addObjectPostProcessor(objectPostProcessor:IObjectPostProcessor):void
Adds an object postprocessor to this object factory.
| AbstractObjectFactory | |
![]() |
addReferenceResolver(referenceResolver:IReferenceResolver):void
This method adds a reference resolver that will be used to resolve property
references.
| AbstractObjectFactory | |
![]() |
clearObjectFromInternalCache(name:String):Object
Removes an object from the internal object definition cache.
| AbstractObjectFactory | |
![]() |
containsObject(objectName:String):Boolean
Determines if the object factory contains a definition with the given name.
| AbstractObjectFactory | |
![]() |
containsObjectDefinition(objectName:String):Boolean
Determines if an object definition with the given name exists
| DefaultListableObjectFactory | |
![]() |
getObject(name:String, constructorArguments:Array = null):*
Will retrieve an object by it's name/id If the definition is a singleton it will be retrieved from
cache if possible.
| AbstractObjectFactory | |
![]() |
getObjectDefinition(objectName:String):IObjectDefinition
Returns the object definition registered with the given name.
| DefaultListableObjectFactory | |
![]() |
getObjectNamesForType(type:Class):Array
Returns all object definitions names that implement the given type.
| DefaultListableObjectFactory | |
![]() |
getObjectsOfType(type:Class):Dictionary
Returns all object definitions that implement the given type.
| DefaultListableObjectFactory | |
![]() |
getType(objectName:String):Class
Returns the type that is defined on the object definition.
| AbstractObjectFactory | |
![]() |
isFactoryObject(objectName:String):Boolean
Determines if an object is a IFactoryObject implementation.
| AbstractObjectFactory | |
![]() |
isPrototype(objectName:String):Boolean
Determines if the definition with the given name is a prototype.
| AbstractObjectFactory | |
![]() |
isSingleton(objectName:String):Boolean
Determines if the definition with the given name is a singleton.
| AbstractObjectFactory | |
|
load():void
Instructs the object factory to start loading the available configuration(s)
| XMLObjectFactory | ||
![]() |
preInstantiateSingletons():void
Instantiates all definitions that are defined as singleton and are not lazy.
| DefaultListableObjectFactory | |
![]() |
registerCustomEditor(requiredType:Class, propertyEditor:IPropertyEditor):void
Registers a custom property editor.
| AbstractObjectFactory | |
![]() |
registerObjectDefinition(objectName:String, objectDefinition:IObjectDefinition):void
Will register the given objectDefinition with the given name.
| DefaultListableObjectFactory | |
![]() |
removeObjectDefinition(objectName:String):void
Removes the definition with the given name from the registry
| DefaultListableObjectFactory | |
![]() |
resolveReference(property:Object):Object
Resolves a property in an object definition.
| AbstractObjectFactory | |
| Method | Defined by | ||
|---|---|---|---|
|
afterParse():void
Hook method, executed after the xml context is parsed.
| XMLObjectFactory | ||
|
beforeParse():void
Hook method, executed before the xml context is parsed.
| XMLObjectFactory | ||
|
loadConfigLocation(configLocation:String):void
Will load a configLocation
| XMLObjectFactory | ||
| Event | Summary | Defined by | ||
|---|---|---|---|---|
| Dispatched as a result of a call to the load method when all available configurations have been parsed. | XMLObjectFactory | |||
| Dispatched when an input or output error occurs that causes a load operation to fail. | XMLObjectFactory | |||
| configLocations | property |
configLocations:Array [read-only]Returns an array of configuration locations.
Implementation public function get configLocations():Array
| parser | property |
public var parser:XMLObjectDefinitionsParserContains the parser of the XML definitions. The instance is created in the constructor if it does not exist allready.
The default value is an intance of XMLObjectDefinitionsParser.
| XMLObjectFactory | () | constructor |
public function XMLObjectFactory(source:* = null)Creates a new XmlObjectFactory
Parameterssource:* (default = null) — the path to the xml config file as a String or as an Array
|
| addConfig | () | method |
public function addConfig(config:XML):voidUse this method to add xml versions of configurations
Parametersconfig:XML — The xml configuration to add
|
| addConfigLocation | () | method |
public function addConfigLocation(configLocation:String):voidUse this method to add aditional configuration locations.
ParametersconfigLocation:String — The location to add. This is the path to the configuration xml file
|
| addEmbeddedConfig | () | method |
public function addEmbeddedConfig(config:Class):voidAdds an embedded config.
Parametersconfig:Class |
| afterParse | () | method |
protected function afterParse():voidHook method, executed after the xml context is parsed.
| beforeParse | () | method |
protected function beforeParse():voidHook method, executed before the xml context is parsed.
| load | () | method |
public function load():voidInstructs the object factory to start loading the available configuration(s)
See also
| loadConfigLocation | () | method |
protected function loadConfigLocation(configLocation:String):voidWill load a configLocation
ParametersconfigLocation:String |
| complete | event |
flash.events.Event
Dispatched as a result of a call to the load method when all available configurations have been parsed.
See also
| ioError | event |
flash.events.IOErrorEvent
Dispatched when an input or output error occurs that causes a load operation to fail.