Packageorg.springextensions.actionscript.ioc.factory.config
SVN browsingFieldRetrievingFactoryObject.as
FisheyeFieldRetrievingFactoryObject.as
Classpublic class FieldRetrievingFactoryObject
InheritanceFieldRetrievingFactoryObject Inheritance AbstractFactoryObject
ImplementsIApplicationDomainAware, IInitializingObject

FieldRetrievingFactoryObject is an IFactoryObject implementation which retrieves a static or non-static field value. It is typically used for retrieving public static constants, which may then be used to set a property value or constructor argument for another object.

Configuration example of how to retrieve a field on an object instance:

  <object class="org.springextensions.actionscript.ioc.factory.config.FieldRetrievingFactoryObject">
    <property name="targetObject" ref="modelLocator" />
    <property name="targetField" value="users" />
  </object>
  

Configuration example of how to retrieve a static field on a class:

  <object class="org.springextensions.actionscript.ioc.factory.config.FieldRetrievingFactoryObject">
    <property name="targetClass" value="mx.core.FlexVersion"/>
    <property name="staticField" value="CURRENT_VERSION"/>
  </object>
  

Configuration example of how to retrieve a field on a class property chain:

  <object class="org.springextensions.actionscript.ioc.factory.config.FieldRetrievingFactoryObject">
    <property name="targetClass" value="mx.core.Application"/>
    <property name="targetField" value="application.systemManager"/>
  </object>
  



Documentation reference: injecting fields from other objects


Public Properties
 PropertyDefined by
  applicationDomain : ApplicationDomain
[write-only]
FieldRetrievingFactoryObject
 InheritedisSingleton : Boolean
Returns if this factory object is a singleton or not.
AbstractFactoryObject
  staticField : String
The static field whose value needs to be retrieved
FieldRetrievingFactoryObject
  targetClass : Class
The class that holds the static field value defined by the staticField property.
FieldRetrievingFactoryObject
  targetField : String
The field whose value needs to be retrieved
FieldRetrievingFactoryObject
  targetObject : *
The target instance that holds the property value defined by the targetField property.
FieldRetrievingFactoryObject
Public Methods
 MethodDefined by
  
Creates a new FieldRetrievingFactoryObject instance.
FieldRetrievingFactoryObject
  
Invoked by an object factory after all properties of an object have been set.
FieldRetrievingFactoryObject
  
Returns an instance of the object managed by this factory.
FieldRetrievingFactoryObject
  
getObjectType():Class
Returns the type of the object this factory manages or null if the type is unknown.
FieldRetrievingFactoryObject
Property detail
applicationDomainproperty
applicationDomain:ApplicationDomain  [write-only]Implementation
    public function set applicationDomain(value:ApplicationDomain):void
staticFieldproperty 
staticField:String  [read-write]

The static field whose value needs to be retrieved

Implementation
    public function get staticField():String
    public function set staticField(value:String):void
targetClassproperty 
targetClass:Class  [read-write]

The class that holds the static field value defined by the staticField property.

Implementation
    public function get targetClass():Class
    public function set targetClass(value:Class):void
targetFieldproperty 
targetField:String  [read-write]

The field whose value needs to be retrieved

Implementation
    public function get targetField():String
    public function set targetField(value:String):void
targetObjectproperty 
targetObject:*  [read-write]

The target instance that holds the property value defined by the targetField property.

Implementation
    public function get targetObject():*
    public function set targetObject(value:*):void
Constructor detail
FieldRetrievingFactoryObject()constructor
public function FieldRetrievingFactoryObject()

Creates a new FieldRetrievingFactoryObject instance.

Method detail
afterPropertiesSet()method
public function afterPropertiesSet():void

Invoked by an object factory after all properties of an object have been set.

getObject()method 
public override function getObject():*

Returns an instance of the object managed by this factory.

Returns
*
getObjectType()method 
public override function getObjectType():Class

Returns the type of the object this factory manages or null if the type is unknown.

Returns
Class