Packageorg.springextensions.actionscript.context.support.mxml
SVN browsingMXMLObjectDefinition.as
FisheyeMXMLObjectDefinition.as
Classpublic class MXMLObjectDefinition
ImplementsIApplicationDomainAware, mx.core.IMXMLObject
SubclassesInterface

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


Documentation reference: composing mxml based configuration metadata


Public Properties
 PropertyDefined by
  abstract : Boolean
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
  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
  dependsOn : Array
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
  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
  methodInvocations : Array
An array of ObjectDefinitions describing the methods that need to be called after object creation.
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
  properties : Object
An anonymous object whose property values will be injected into the created object, the property names on this object are the same as on the created object.
MXMLObjectDefinition
  propertyObjectDefinitions : Array
[read-only] An array of Property objects that have been added to the current ObjectDefinition
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
  template : Template
If not null the specified Template will be used to populate the current ObjectDefinition
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
  
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
  
addParam(param:Param):void
Adds the specified Param to the params dictionary.
MXMLObjectDefinition
  
getApplicationDomain():ApplicationDomain
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
abstractproperty
abstract:Boolean  [read-write]Implementation
    public function get abstract():Boolean
    public function set abstract(value:Boolean):void
applicationDomainproperty 
applicationDomain:ApplicationDomain  [read-write]

Implementation
    public function get applicationDomain():ApplicationDomain
    public function set applicationDomain(value:ApplicationDomain):void
autoWireModeproperty 
autoWireMode:String  [read-write]

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  [read-write]

Placeholder for all MXML child content of the current ObjectDefinition

Implementation
    public function get childContent():Array
    public function set childContent(value:Array):void
classNameproperty 
className:String  [read-write]

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  [read-write]

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  [read-write]

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

definitionproperty 
definition:IObjectDefinition  [read-only]

The IObjectDefinition that is populated by the current MXML ObjectDefinition

Implementation
    public function get definition():IObjectDefinition
dependsOnproperty 
dependsOn:Array  [read-write]Implementation
    public function get dependsOn():Array
    public function set dependsOn(value:Array):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  [read-write]

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  [read-write]

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  [read-write]

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  [read-write]

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

initMethodproperty 
initMethod:String  [read-write]

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
isAutoWireCandidateproperty 
isAutoWireCandidate:Boolean  [read-write]

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 
protected var _isInitialized:Boolean = false
isInitializedproperty 
isInitialized:Boolean  [read-only]Implementation
    public function get isInitialized():Boolean
isLazyInitproperty 
isLazyInit:Boolean  [read-write]

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  [read-write]

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

methodInvocationsproperty 
methodInvocations:Array  [read-write]

An array of ObjectDefinitions describing the methods that need to be called after object creation.

Implementation
    public function get methodInvocations():Array
    public function set methodInvocations(value:Array):void
paramsproperty 
params:Dictionary  [read-only]

A dictionary of Param objects

Implementation
    public function get params():Dictionary

See also

parentObjectproperty 
parentObject:MXMLObjectDefinition  [read-write]

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  [read-write]

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
propertiesproperty 
properties:Object  [read-write]

An anonymous object whose property values will be injected into the created object, the property names on this object are the same as on the created object.

Implementation
    public function get properties():Object
    public function set properties(value:Object):void
propertyObjectDefinitionsproperty 
propertyObjectDefinitions:Array  [read-only]

An array of Property objects that have been added to the current ObjectDefinition

Implementation
    public function get propertyObjectDefinitions():Array

See also

scopeproperty 
scope:String  [read-write]

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  [read-write]Implementation
    public function get skipMetadata():Boolean
    public function set skipMetadata(value:Boolean):void
skipPostProcessorsproperty 
skipPostProcessors:Boolean  [read-write]Implementation
    public function get skipPostProcessors():Boolean
    public function set skipPostProcessors(value:Boolean):void
templateproperty 
template:Template  [read-write]

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

Implementation
    public function get template():Template
    public function set template(value:Template):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.
addParam()method 
protected function addParam(param:Param):void

Adds the specified Param to the params dictionary.

Parameters
param:Param — The specified Param 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.
getApplicationDomain()method 
protected function getApplicationDomain():ApplicationDomain

Returns
ApplicationDomain
initializeComponent()method 
public function initializeComponent():void

After FlexEvent.CREATION_COMPLETE has been dispatched the processChildContent() method is invoked.

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

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