| Package | org.springextensions.actionscript.ioc.factory.impl |
| Class | public class MethodInvokingFactoryObject |
| Inheritance | MethodInvokingFactoryObject org.as3commons.reflect.MethodInvoker |
| Implements | IFactoryObject, IApplicationContextAware |
MethodInvokingFactoryObject is an IFactoryObject implementation which retrieves the result of a method invocation
on a specified object or class which may then be used to set a property value or constructor argument for another object.
Configuration example of how to retrieve an IResourceManager instance:
<object class="org.springextensions.actionscript.ioc.factory.config.MethodInvokingFactoryObject"> <property name="targetClass" value="mx.resources.ResourceManager" /> <property name="targetMethod" value="getInstance" /> </object>
| Property | Defined By | ||
|---|---|---|---|
| applicationContext : IApplicationContext | MethodInvokingFactoryObject | ||
| arguments : Array [override] [write-only] | MethodInvokingFactoryObject | ||
| isSingleton : Boolean [read-only]
Returns if this factory object is a singleton or not. | MethodInvokingFactoryObject | ||
| target : * [override] [write-only]
| MethodInvokingFactoryObject | ||
| targetClass : Class
The class that holds the static field value defined by the staticField property. | MethodInvokingFactoryObject | ||
| targetObject : *
The target instance that holds the property value defined by the targetField property. | MethodInvokingFactoryObject | ||
| Method | Defined By | ||
|---|---|---|---|
Creates a new MethodInvokingFactoryObject instance. | MethodInvokingFactoryObject | ||
getObject():*
Returns an instance of the object managed by this factory. | MethodInvokingFactoryObject | ||
getObjectType():Class
Returns the type of the object this factory manages or null if the type is unknown. | MethodInvokingFactoryObject | ||
| applicationContext | property |
applicationContext:IApplicationContext
public function get applicationContext():IApplicationContext public function set applicationContext(value:IApplicationContext):void| arguments | property |
arguments:Array [write-only] [override] public function set arguments(value:Array):void| isSingleton | property |
isSingleton:Boolean [read-only] Returns if this factory object is a singleton or not. If it is a singleton, it will return a new instance of the object it creates on each getObject() call. Else, the same object will be returned.
public function get isSingleton():Boolean| target | property |
target:* [write-only] [override]
public function set target(value:any):void| targetClass | property |
targetClass:ClassThe class that holds the static field value defined by the staticField property.
public function get targetClass():Class public function set targetClass(value:Class):void| targetObject | property |
targetObject:*The target instance that holds the property value defined by the targetField property.
public function get targetObject():* public function set targetObject(value:any):void| MethodInvokingFactoryObject | () | Constructor |
public function MethodInvokingFactoryObject()
Creates a new MethodInvokingFactoryObject instance.
| getObject | () | method |
public function getObject():*Returns an instance of the object managed by this factory.
Returns* |
| getObjectType | () | method |
public function getObjectType():ClassReturns the type of the object this factory manages or null if the type is unknown.
ReturnsClass |