Packageorg.springextensions.actionscript.ioc.config.impl.mxml.component
Classpublic class MXMLObjectDefinition
InheritanceMXMLObjectDefinition Inheritance 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

MXMLApplicationContext


Public Properties
 PropertyDefined 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
Protected Properties
 PropertyDefined By
  _isInitialized : Boolean = false
MXMLObjectDefinition
Public Methods
 MethodDefined By
  
Creates a new ObjectDefinition instance
MXMLObjectDefinition
  
Adds the specified ConstructorArg resolved value to the constructorArguments array.
MXMLObjectDefinition
  
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
  
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
Protected Methods
 MethodDefined By
  
MXMLObjectDefinition
  
MXMLObjectDefinition
  
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
Public Constants
 ConstantDefined 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
Property Detail
_isInitializedproperty
protected var _isInitialized:Boolean = false

applicationContextproperty 
applicationContext:IApplicationContext


Implementation
    public function get applicationContext():IApplicationContext
    public function set applicationContext(value:IApplicationContext):void
applicationDomainproperty 
applicationDomain:ApplicationDomain


Implementation
    public function get applicationDomain():ApplicationDomain
    public function set applicationDomain(value:ApplicationDomain):void
autoWireModeproperty 
autoWireMode:String

Defines the way an object will be autowired (configured). This can be the following values: no,byName,byType,constructor,autodetect


Implementation
    public function get autoWireMode():String
    public function set autoWireMode(value:String):void
childContentproperty 
childContent:Array

Placeholder for all MXML child content of the current ObjectDefinition


Implementation
    public function get childContent():Array
    public function set childContent(value:Array):void
childContextAccessproperty 
childContextAccess:String


Implementation
    public function get childContextAccess():String
    public function set childContextAccess(value:String):void
classNameproperty 
className:String

The classname of the object that the current ObjectDefinition describes.


Implementation
    public function get className():String
    public function set className(value:String):void
clazzproperty 
clazz:Class

The Class of the object that the current ObjectDefinition describes.


Implementation
    public function get clazz():Class
    public function set clazz(value:Class):void
constructorArgumentsproperty 
constructorArguments:Array

An array of arguments that will be passed to the constructor of the object.


Implementation
    public function get constructorArguments():Array
    public function set constructorArguments(value:Array):void
defaultedPropertiesproperty 
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.


Implementation
    public function get defaultedProperties():Dictionary

See also

Template
parentObject
definitionproperty 
definition:IObjectDefinition  [read-only]

The IObjectDefinition that is populated by the current MXML ObjectDefinition


Implementation
    public function get definition():IObjectDefinition
dependencyCheckproperty 
dependencyCheck:String


Implementation
    public function get dependencyCheck():String
    public function set dependencyCheck(value:String):void
dependsOnproperty 
dependsOn:Array


Implementation
    public function get dependsOn():Array
    public function set dependsOn(value:Array):void
destroyMethodproperty 
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.


Implementation
    public function get destroyMethod():String
    public function set destroyMethod(value:String):void
explicitPropertiesproperty 
explicitProperties:Dictionary  [read-only]

A dictionary of property names that have been explicitly set through MXML markup.


Implementation
    public function get explicitProperties():Dictionary
factoryMethodproperty 
factoryMethod:String

The name of method responsible for the creation of the object.


Implementation
    public function get factoryMethod():String
    public function set factoryMethod(value:String):void
factoryObjectproperty 
factoryObject:MXMLObjectDefinition

The ObjectDefinition for the factory object responsible for the creation of the object.


Implementation
    public function get factoryObject():MXMLObjectDefinition
    public function set factoryObject(value:MXMLObjectDefinition):void
factoryObjectNameproperty 
factoryObjectName:String

The name of the factory object responsible for the creation of the object.


Implementation
    public function get factoryObjectName():String
    public function set factoryObjectName(value:String):void
idproperty 
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.


Implementation
    public function get id():String
    public function set id(value:String):void

See also

IObjectDefinition
initMethodproperty 
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.


Implementation
    public function get initMethod():String
    public function set initMethod(value:String):void
isAbstractproperty 
isAbstract:Boolean


Implementation
    public function get isAbstract():Boolean
    public function set isAbstract(value:Boolean):void
isAutoWireCandidateproperty 
isAutoWireCandidate:Boolean

True if this object can be used as a value used by the container when it autowires an object by type.


Implementation
    public function get isAutoWireCandidate():Boolean
    public function set isAutoWireCandidate(value:Boolean):void
isInitializedproperty 
isInitialized:Boolean  [read-only]


Implementation
    public function get isInitialized():Boolean
isLazyInitproperty 
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.


Implementation
    public function get isLazyInit():Boolean
    public function set isLazyInit(value:Boolean):void
isSingletonproperty 
isSingleton:Boolean

True 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.


Implementation
    public function get isSingleton():Boolean
    public function set isSingleton(value:Boolean):void
methodDefinitionsproperty 
methodDefinitions:Dictionary  [read-only]

A dictionary of MethodInvocation objects


Implementation
    public function get methodDefinitions():Dictionary

See also

MethodInvocation
objectDefinitionsproperty 
objectDefinitions:Object  [read-only]


Implementation
    public function get objectDefinitions():Object
paramsproperty 
params:Dictionary  [read-only]

A dictionary of Param objects


Implementation
    public function get params():Dictionary

See also

Param
parentObjectproperty 
parentObject:MXMLObjectDefinition

If not null the specified ObjectDefinition will be used to populate the current ObjectDefinition


Implementation
    public function get parentObject():MXMLObjectDefinition
    public function set parentObject(value:MXMLObjectDefinition):void
primaryproperty 
primary:Boolean

True 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.


Implementation
    public function get primary():Boolean
    public function set primary(value:Boolean):void
scopeproperty 
scope:String

Defines the scope of the object, the object is either a singleton or a prototype object.


Implementation
    public function get scope():String
    public function set scope(value:String):void
skipMetadataproperty 
skipMetadata:Boolean


Implementation
    public function get skipMetadata():Boolean
    public function set skipMetadata(value:Boolean):void
skipPostProcessorsproperty 
skipPostProcessors:Boolean


Implementation
    public function get skipPostProcessors():Boolean
    public function set skipPostProcessors(value:Boolean):void
Constructor Detail
MXMLObjectDefinition()Constructor
public function MXMLObjectDefinition()

Creates a new ObjectDefinition instance

Method Detail
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:*):RuntimeObjectReference

Parameters

propertyValue:*

Returns
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():void

Parses 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

Returns
* — The actual value of the Arg

See also

ObjectDefinition
RuntimeObjectReference
Constant Detail
ANON_OBJECT_PREFIXConstant
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

serializeMXMLApplicationContext()