Packageorg.springextensions.actionscript.ioc.factory.config
SVN browsingMethodInvokingFactoryObject.as
FisheyeMethodInvokingFactoryObject.as
Classpublic class MethodInvokingFactoryObject
InheritanceMethodInvokingFactoryObject Inheritance org.as3commons.reflect.MethodInvoker
ImplementsIApplicationContextAware, IFactoryObject

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>
  



Documentation reference: injecting method invocation results from other objects


Public Properties
 PropertyDefined by
  applicationContext : IApplicationContext
Sets the IApplicationContext that this object runs in.
MethodInvokingFactoryObject
  arguments : Array
[write-only]
MethodInvokingFactoryObject
  isSingleton : Boolean
[read-only] Returns if this factory object is a singleton or not.
MethodInvokingFactoryObject
  target : *
[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
Public Methods
 MethodDefined by
  
Creates a new MethodInvokingFactoryObject instance.
MethodInvokingFactoryObject
  
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
Property detail
applicationContextproperty
applicationContext:IApplicationContext  [read-write]

Sets the IApplicationContext that this object runs in.

Implementation
    public function get applicationContext():IApplicationContext
    public function set applicationContext(value:IApplicationContext):void
argumentsproperty 
arguments:Array  [write-only]Implementation
    public function set arguments(value:Array):void
isSingletonproperty 
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.

Implementation
    public function get isSingleton():Boolean
targetproperty 
target:*  [write-only]

Implementation
    public function set target(value:*):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
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
MethodInvokingFactoryObject()constructor
public function MethodInvokingFactoryObject()

Creates a new MethodInvokingFactoryObject instance.

Method detail
getObject()method
public function getObject():*

Returns an instance of the object managed by this factory.

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

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

Returns
Class