| Package | org.springextensions.actionscript.ioc.config.impl.mxml.component |
| Class | public class MXMLObjectDefinition |
| Inheritance | MXMLObjectDefinition Object |
| Implements | mx.core.IMXMLObject, IApplicationContextAware |
| Subclasses | FactorObjectDefinition, Interface, StageObjectProcessor |
MXML representation of an ObjectDefinition object. This non-visual component must be declared as
a child component of a MXMLApplicationContext component.
Describes an object that can populate an IObjectDefinition instance with properties defined in MXML.
Default MXML PropertychildContent
See also
| Property | Defined By | ||
|---|---|---|---|
| applicationContext : IApplicationContext | MXMLObjectDefinition | ||
| applicationDomain : ApplicationDomain | MXMLObjectDefinition | ||
| autoWireMode : String
Defines the way an object will be autowired (configured). | MXMLObjectDefinition | ||
| childContent : Array
Placeholder for all MXML child content of the current ObjectDefinition
| MXMLObjectDefinition | ||
| childContextAccess : String | MXMLObjectDefinition | ||
| className : String
The classname of the object that the current ObjectDefinition describes. | MXMLObjectDefinition | ||
| clazz : Class
The Class of the object that the current ObjectDefinition describes. | MXMLObjectDefinition | ||
| constructorArguments : Array
An array of arguments that will be passed to the constructor of the object. | MXMLObjectDefinition | ||
| defaultedProperties : Dictionary [read-only]
A dictionary of property names that have not been explicitly set through MXML markup. | MXMLObjectDefinition | ||
| definition : IObjectDefinition [read-only]
The IObjectDefinition that is populated by the current MXML ObjectDefinition
| MXMLObjectDefinition | ||
| dependencyCheck : String | MXMLObjectDefinition | ||
| dependsOn : Array | MXMLObjectDefinition | ||
| destroyMethod : String
The name of a method on the class defined by the class property that will be called when the
application context is disposed. | MXMLObjectDefinition | ||
| explicitProperties : Dictionary [read-only]
A dictionary of property names that have been explicitly set through MXML markup. | MXMLObjectDefinition | ||
| factoryMethod : String
The name of method responsible for the creation of the object. | MXMLObjectDefinition | ||
| factoryObject : MXMLObjectDefinition
The ObjectDefinition for the factory object responsible for the creation of the object. | MXMLObjectDefinition | ||
| factoryObjectName : String
The name of the factory object responsible for the creation of the object. | MXMLObjectDefinition | ||
| id : String
The unique id for the current ObjectDefinition as defined in the MXML markup. | MXMLObjectDefinition | ||
| initMethod : String
The name of a method on the class defined by the className property or clazz property that will be called immediately after the object has been configured. | MXMLObjectDefinition | ||
| isAbstract : Boolean | MXMLObjectDefinition | ||
| isAutoWireCandidate : Boolean
True if this object can be used as a value used by the container when it autowires an object by type. | MXMLObjectDefinition | ||
| isInitialized : Boolean [read-only] | MXMLObjectDefinition | ||
| isLazyInit : Boolean
True if the object does not need to be eagerly pre-instantiated by the container. | MXMLObjectDefinition | ||
| isSingleton : Boolean
True if only one instance of this object needs to be created by the container, i.e. | MXMLObjectDefinition | ||
| methodDefinitions : Dictionary [read-only]
A dictionary of MethodInvocation objects
| MXMLObjectDefinition | ||
| objectDefinitions : Object [read-only] | MXMLObjectDefinition | ||
| params : Dictionary [read-only]
A dictionary of Param objects
| MXMLObjectDefinition | ||
| parentObject : MXMLObjectDefinition
If not null the specified ObjectDefinition will be used to populate the current ObjectDefinition
| MXMLObjectDefinition | ||
| primary : Boolean
True if this object needs to be used as the primary autowire candidate when the container is autowiring by type. | MXMLObjectDefinition | ||
| scope : String
Defines the scope of the object, the object is either a singleton or a prototype object. | MXMLObjectDefinition | ||
| skipMetadata : Boolean | MXMLObjectDefinition | ||
| skipPostProcessors : Boolean | MXMLObjectDefinition | ||
| Property | Defined By | ||
|---|---|---|---|
| _isInitialized : Boolean = false | MXMLObjectDefinition | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new ObjectDefinition instance
| MXMLObjectDefinition | ||
addConstructorArg(arg:ConstructorArg):void
Adds the specified ConstructorArg resolved value to the constructorArguments array. | MXMLObjectDefinition | ||
addMethodInvocation(method:MethodInvocation):void
Adds the specified MethodInvocation to the methodDefinitions dictionary, then creates an IObjectDefinition
based on the MethodInvocation properties, adds this to the definition.methodInvocations and propertyObjectDefinitions lists. | MXMLObjectDefinition | ||
addProperty(property:Property):void
Adds the specified Property to the properties dictionary and resolves its value by invoking resolveValue(). | MXMLObjectDefinition | ||
initializeComponent(context:IApplicationContext):void
After FlexEvent.CREATION_COMPLETE has been dispatched the processChildContent() method is invoked. | MXMLObjectDefinition | ||
initialized(document:Object, id:String):void | MXMLObjectDefinition | ||
parse():void
Parses the MXML object definition. | MXMLObjectDefinition | ||
| Method | Defined By | ||
|---|---|---|---|
findConfigurationPropertyNameWithValue(propertyValue:*):RuntimeObjectReference | MXMLObjectDefinition | ||
initMXMLObjectDefinition():void | MXMLObjectDefinition | ||
resolveValue(arg:Arg):*
Returns a RuntimeObjectReference instance if the specified Arg has a ref property assigned, returns a Class instance
if the Arg has a type property of "class" and a string as value, returns a RuntimeObjectReference if the property value is a ObjectDefinition
and adds this instance to the propertyObjectDefinitions list, in all other cases it just returns the value of the specified Arg. | MXMLObjectDefinition | ||
| Constant | Defined By | ||
|---|---|---|---|
| ANON_OBJECT_PREFIX : String = anonref_ [static]
Prefix added to ObjectDefinitions without an explicit context id, this prefix is needed
by the MXMLUtils serializer
| MXMLObjectDefinition | ||
| _isInitialized | property |
protected var _isInitialized:Boolean = false| applicationContext | property |
applicationContext:IApplicationContext public function get applicationContext():IApplicationContext public function set applicationContext(value:IApplicationContext):void| applicationDomain | property |
applicationDomain:ApplicationDomain
public function get applicationDomain():ApplicationDomain public function set applicationDomain(value:ApplicationDomain):void| autoWireMode | property |
autoWireMode:StringDefines the way an object will be autowired (configured). This can be the following values: no,byName,byType,constructor,autodetect
public function get autoWireMode():String public function set autoWireMode(value:String):void| childContent | property |
childContent:Array
Placeholder for all MXML child content of the current ObjectDefinition
public function get childContent():Array public function set childContent(value:Array):void| childContextAccess | property |
childContextAccess:String public function get childContextAccess():String public function set childContextAccess(value:String):void| className | property |
className:String
The classname of the object that the current ObjectDefinition describes.
public function get className():String public function set className(value:String):void| clazz | property |
clazz:Class
The Class of the object that the current ObjectDefinition describes.
public function get clazz():Class public function set clazz(value:Class):void| constructorArguments | property |
constructorArguments:ArrayAn array of arguments that will be passed to the constructor of the object.
public function get constructorArguments():Array public function set constructorArguments(value:Array):void| defaultedProperties | property |
defaultedProperties:Dictionary [read-only]
A dictionary of property names that have not been explicitly set through MXML markup.
When the current ObjectDefinition is configured by a Template or parent definition
only the properties present in this dictionary will be copied from the source definition.
public function get defaultedProperties():DictionarySee also
| definition | property |
definition:IObjectDefinition [read-only]
The IObjectDefinition that is populated by the current MXML ObjectDefinition
public function get definition():IObjectDefinition| dependencyCheck | property |
dependencyCheck:String
public function get dependencyCheck():String public function set dependencyCheck(value:String):void| dependsOn | property |
dependsOn:Array public function get dependsOn():Array public function set dependsOn(value:Array):void| destroyMethod | property |
destroyMethod:String
The name of a method on the class defined by the class property that will be called when the
application context is disposed. Destroy methods are used to release resources that are being kept by an object.
public function get destroyMethod():String public function set destroyMethod(value:String):void| explicitProperties | property |
explicitProperties:Dictionary [read-only] A dictionary of property names that have been explicitly set through MXML markup.
public function get explicitProperties():Dictionary| factoryMethod | property |
factoryMethod:StringThe name of method responsible for the creation of the object.
public function get factoryMethod():String public function set factoryMethod(value:String):void| factoryObject | property |
factoryObject:MXMLObjectDefinitionThe ObjectDefinition for the factory object responsible for the creation of the object.
public function get factoryObject():MXMLObjectDefinition public function set factoryObject(value:MXMLObjectDefinition):void| factoryObjectName | property |
factoryObjectName:StringThe name of the factory object responsible for the creation of the object.
public function get factoryObjectName():String public function set factoryObjectName(value:String):void| id | property |
id:String
The unique id for the current ObjectDefinition as defined in the MXML markup. This id will
also be used to register as the name of the IObjectDefinition instance.
public function get id():String public function set id(value:String):voidSee also
| initMethod | property |
initMethod:StringThe name of a method on the class defined by the className property or clazz property that will be called immediately after the object has been configured.
public function get initMethod():String public function set initMethod(value:String):void| isAbstract | property |
isAbstract:Boolean public function get isAbstract():Boolean public function set isAbstract(value:Boolean):void| isAutoWireCandidate | property |
isAutoWireCandidate:BooleanTrue if this object can be used as a value used by the container when it autowires an object by type.
public function get isAutoWireCandidate():Boolean public function set isAutoWireCandidate(value:Boolean):void| isInitialized | property |
isInitialized:Boolean [read-only] public function get isInitialized():Boolean| isLazyInit | property |
isLazyInit:Boolean
True if the object does not need to be eagerly pre-instantiated by the container. I.e. the object will be created after the first call to the getObject() method.
public function get isLazyInit():Boolean public function set isLazyInit(value:Boolean):void| isSingleton | property |
isSingleton:BooleanTrue if only one instance of this object needs to be created by the container, i.e. every subsequent call to the getObject() method will return the same instance.
public function get isSingleton():Boolean public function set isSingleton(value:Boolean):void| methodDefinitions | property |
methodDefinitions:Dictionary [read-only]
A dictionary of MethodInvocation objects
public function get methodDefinitions():DictionarySee also
| objectDefinitions | property |
objectDefinitions:Object [read-only] public function get objectDefinitions():Object| params | property |
params:Dictionary [read-only]
A dictionary of Param objects
public function get params():DictionarySee also
| parentObject | property |
parentObject:MXMLObjectDefinitionIf not null the specified ObjectDefinition will be used to populate the current ObjectDefinition
public function get parentObject():MXMLObjectDefinition public function set parentObject(value:MXMLObjectDefinition):void| primary | property |
primary:BooleanTrue if this object needs to be used as the primary autowire candidate when the container is autowiring by type. This means that if multiple objects are found of the same type, the object marked as 'primary' will become the autowire candidate.
public function get primary():Boolean public function set primary(value:Boolean):void| scope | property |
scope:StringDefines the scope of the object, the object is either a singleton or a prototype object.
public function get scope():String public function set scope(value:String):void| skipMetadata | property |
skipMetadata:Boolean public function get skipMetadata():Boolean public function set skipMetadata(value:Boolean):void| skipPostProcessors | property |
skipPostProcessors:Boolean public function get skipPostProcessors():Boolean public function set skipPostProcessors(value:Boolean):void| MXMLObjectDefinition | () | Constructor |
public function MXMLObjectDefinition()
Creates a new ObjectDefinition instance
| addConstructorArg | () | method |
public function addConstructorArg(arg:ConstructorArg):void
Adds the specified ConstructorArg resolved value to the constructorArguments array.
Parameters
arg:ConstructorArg — The specified ConstructorArg instance.
|
| addMethodInvocation | () | method |
public function addMethodInvocation(method:MethodInvocation):void
Adds the specified MethodInvocation to the methodDefinitions dictionary, then creates an IObjectDefinition
based on the MethodInvocation properties, adds this to the definition.methodInvocations and propertyObjectDefinitions lists.
Parameters
method:MethodInvocation — The specified MethodInvocation instance.
|
| addProperty | () | method |
public function addProperty(property:Property):void
Adds the specified Property to the properties dictionary and resolves its value by invoking resolveValue().
Parameters
property:Property — The specified Property instance.
|
| findConfigurationPropertyNameWithValue | () | method |
protected function findConfigurationPropertyNameWithValue(propertyValue:*):RuntimeObjectReferenceParameters
propertyValue:* |
RuntimeObjectReference |
| initializeComponent | () | method |
public function initializeComponent(context:IApplicationContext):void
After FlexEvent.CREATION_COMPLETE has been dispatched the processChildContent() method is invoked.
Parameters
context:IApplicationContext |
| initialized | () | method |
public function initialized(document:Object, id:String):void
Parameters
document:Object | |
id:String |
| initMXMLObjectDefinition | () | method |
protected function initMXMLObjectDefinition():void| parse | () | method |
public function parse():voidParses the MXML object definition.
| resolveValue | () | method |
protected function resolveValue(arg:Arg):*
Returns a RuntimeObjectReference instance if the specified Arg has a ref property assigned, returns a Class instance
if the Arg has a type property of "class" and a string as value, returns a RuntimeObjectReference if the property value is a ObjectDefinition
and adds this instance to the propertyObjectDefinitions list, in all other cases it just returns the value of the specified Arg.
Parameters
arg:Arg — The specified Arg
|
* — The actual value of the Arg
|
See also
| ANON_OBJECT_PREFIX | Constant |
public static const ANON_OBJECT_PREFIX:String = anonref_
Prefix added to ObjectDefinitions without an explicit context id, this prefix is needed
by the MXMLUtils serializer
See also