| Package | org.springextensions.actionscript.ioc.factory.config |
| SVN browsing | FieldRetrievingFactoryObject.as |
| Fisheye | FieldRetrievingFactoryObject.as |
| Class | public class FieldRetrievingFactoryObject |
| Inheritance | FieldRetrievingFactoryObject AbstractFactoryObject |
| Implements | IApplicationDomainAware, 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
| Property | Defined by | ||
|---|---|---|---|
| applicationDomain : ApplicationDomain [write-only]
| FieldRetrievingFactoryObject | ||
![]() | isSingleton : 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 | ||
| Method | Defined by | ||
|---|---|---|---|
|
Creates a new
FieldRetrievingFactoryObject instance. | FieldRetrievingFactoryObject | ||
|
afterPropertiesSet():void
Invoked by an object factory after all properties of an object
have been set.
| FieldRetrievingFactoryObject | ||
|
getObject():*
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 | ||
| applicationDomain | property |
applicationDomain:ApplicationDomain [write-only]Implementation
public function set applicationDomain(value:ApplicationDomain):void
| staticField | property |
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
| targetClass | property |
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
| targetField | property |
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
| targetObject | property |
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
| FieldRetrievingFactoryObject | () | constructor |
public function FieldRetrievingFactoryObject()
Creates a new FieldRetrievingFactoryObject instance.
| afterPropertiesSet | () | method |
public function afterPropertiesSet():voidInvoked 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():ClassReturns the type of the object this factory manages or null if the type is unknown.
ReturnsClass |