| Package | org.springextensions.actionscript.ioc.factory.xml |
| SVN browsing | XMLObjectFactory.as |
| Fisheye | XMLObjectFactory.as |
| Class | public class XMLObjectFactory |
| Inheritance | XMLObjectFactory DefaultListableObjectFactory AbstractObjectFactory flash.events.EventDispatcher |
| Implements | IXMLObjectFactory |
| Subclasses | XMLApplicationContext |
| Property | Defined by | ||
|---|---|---|---|
![]() | allowObjectDefinitionOverriding : Boolean
Set whether it should be allowed to override object definitions by registering
a different definition with the same name, automatically replacing the former.
| DefaultListableObjectFactory | |
![]() | autowireProcessor : IAutowireProcessor
| AbstractObjectFactory | |
| configLocations : Array [read-only]
Returns an array of configuration locations.
| XMLObjectFactory | ||
| loadedProperties : Array [read-only]
An Array of
Properties instances that represent all the loaded property file. | 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 | |
![]() | objectDefinitions : Object | AbstractObjectFactory | |
| parser : XMLObjectDefinitionsParser
Contains the parser of the XML definitions.
| XMLObjectFactory | ||
![]() | typeConverter : ITypeConverter
The current type converter implementation
| AbstractObjectFactory | |
| Property | Defined by | ||
|---|---|---|---|
| currentConfigLocation : String = "" | XMLObjectFactory | ||
![]() | earlySingletonCache : Object Cache of early cached singletons for circular references
| AbstractObjectFactory | |
![]() | objectPostProcessors : Array Object post processors to apply when creating objects
| AbstractObjectFactory | |
![]() | referenceResolvers : Array Reference resolvers used when creating objects
| AbstractObjectFactory | |
![]() | singletonCache : Object Cache of created singleton objects
| 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 associated with the given object 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
This method will internally do the following:
| XMLObjectFactory | ||
![]() |
preInstantiateSingletons():void
Checks if the objectdefinition is an implementation of | DefaultListableObjectFactory | |
![]() |
registerCustomEditor(requiredType:Class, propertyEditor:IPropertyEditor):void
Registers a custom property editor.
| AbstractObjectFactory | |
![]() |
registerObjectDefinition(objectName:String, objectDefinition:IObjectDefinition):void
Registers 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 | |
![]() |
wire(object:*, objectDefinition:IObjectDefinition, objectName:String = null):void
| AbstractObjectFactory | |
| Method | Defined by | ||
|---|---|---|---|
|
addImportLocationsIfAny(xml:XML):void
Checks if the given xml data contains any
| XMLObjectFactory | ||
|
afterParse():void
Hook method, executed after the xml context is parsed.
| XMLObjectFactory | ||
|
beforeParse():void
Hook method, executed before the xml context is parsed.
| XMLObjectFactory | ||
|
cleanupLoader():void
If the
_loader variable is not null the onLoaderComplete
and onIOError event handlers are removed. | XMLObjectFactory | ||
|
getBaseURL(url:String):String
Returns the base url of the file this loading is loading.
| XMLObjectFactory | ||
|
loadConfigLocation(configLocation:String):void
Will load a configLocation
| XMLObjectFactory | ||
|
XMLObjectFactoryInit(source:*):void
Initializes the
XMLObjectFactoryInit instance
| 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
| currentConfigLocation | property |
protected var currentConfigLocation:String = ""
| loadedProperties | property |
loadedProperties:Array [read-only]
An Array of Properties instances that represent all the loaded property file.
public function get loadedProperties():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 instance 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 |
| addImportLocationsIfAny | () | method |
protected function addImportLocationsIfAny(xml:XML):void
Checks if the given xml data contains any
xml:XML |
| 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.
| cleanupLoader | () | method |
protected function cleanupLoader():void
If the _loader variable is not null the onLoaderComplete
and onIOError event handlers are removed.
| getBaseURL | () | method |
protected function getBaseURL(url:String):StringReturns the base url of the file this loading is loading.
Parametersurl:String |
String |
| load | () | method |
public function load():voidThis method will internally do the following:
See also
| loadConfigLocation | () | method |
protected function loadConfigLocation(configLocation:String):voidWill load a configLocation
ParametersconfigLocation:String |
| XMLObjectFactoryInit | () | method |
protected function XMLObjectFactoryInit(source:*):void
Initializes the XMLObjectFactoryInit instance
source:* |
| 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.
See also