Packageorg.springextensions.actionscript.ioc.factory.config
SVN browsingEventHandlerProxy.as
FisheyeEventHandlerProxy.as
Classpublic class EventHandlerProxy
InheritanceEventHandlerProxy Inheritance org.as3commons.reflect.MethodInvoker
ImplementsIApplicationDomainAware
SubclassesCommandProxy

Proxied method invoker for event handlers.



Documentation reference: eventbus event handling using metadata annotations


Public Properties
 PropertyDefined by
  applicationDomain : ApplicationDomain
EventHandlerProxy
  arguments : Array
[write-only] When setting the argument(s) for this proxy (which should be an Event), we save the Event in the protected event variable.
EventHandlerProxy
Protected Properties
 PropertyDefined by
  event : Event
EventHandlerProxy
  methodInstance : Method
EventHandlerProxy
  properties : Array
EventHandlerProxy
Public Methods
 MethodDefined by
  
EventHandlerProxy(target:Object, method:Method, properties:Array = null)
Creates a new EventHandlerProxy instance.
EventHandlerProxy
  
invoke():*
Invokes the event handler for the proxied method and decides what arguments to use, based on the metadata of event handler function.
EventHandlerProxy
Protected Methods
 MethodDefined by
  
getArguments():Array
Returns the arguments that need to be used for invoking the proxied result handler.
EventHandlerProxy
  
Returns the arguments based on the method signature of the proxied event handler.
EventHandlerProxy
  
getArgumentsFromMethodParameters(method:Method):Array
Returns the arguments based on the proxied method parameters.
EventHandlerProxy
  
getArgumentsFromProperties(properties:Array):Array
Returns the arguments based on the 'properties' value of the EventHandler annotation.
EventHandlerProxy
  
getEventPropertyByType(event:Event, type:Type):Object
Returns a property of the given event that is of the given type.
EventHandlerProxy
  
hasMultipleParametersOfSameType(method:Method):Boolean
Returns true if the specified Method has multiple parameters of the same type.
EventHandlerProxy
  
init(target:Object, method:Method, properties:Array):void
Initializes the current EventHandlerProxy.
EventHandlerProxy
Property detail
applicationDomainproperty
applicationDomain:ApplicationDomain  [read-write]

Implementation
    public function get applicationDomain():ApplicationDomain
    public function set applicationDomain(value:ApplicationDomain):void
argumentsproperty 
arguments:Array  [write-only]

When setting the argument(s) for this proxy (which should be an Event), we save the Event in the protected event variable.

Implementation
    public function set arguments(value:Array):void
eventproperty 
protected var event:Event
methodInstanceproperty 
protected var methodInstance:Method
propertiesproperty 
protected var properties:Array
Constructor detail
EventHandlerProxy()constructor
public function EventHandlerProxy(target:Object, method:Method, properties:Array = null)

Creates a new EventHandlerProxy instance.

Parameters
target:Object
 
method:Method
 
properties:Array (default = null)
Method detail
getArguments()method
protected function getArguments():Array

Returns the arguments that need to be used for invoking the proxied result handler.

Returns
Array
getArgumentsFromMethod()method 
protected function getArgumentsFromMethod():Array

Returns the arguments based on the method signature of the proxied event handler.

Returns
Array
getArgumentsFromMethodParameters()method 
protected function getArgumentsFromMethodParameters(method:Method):Array

Returns the arguments based on the proxied method parameters.

Parameters
method:Method — The specified Method instance.

Returns
Array — An Array of argument objects.
getArgumentsFromProperties()method 
protected function getArgumentsFromProperties(properties:Array):Array

Returns the arguments based on the 'properties' value of the EventHandler annotation.

Parameters
properties:Array

Returns
Array
getEventPropertyByType()method 
protected function getEventPropertyByType(event:Event, type:Type):Object

Returns a property of the given event that is of the given type.

Parameters
event:Event
 
type:Type

Returns
Object
hasMultipleParametersOfSameType()method 
protected function hasMultipleParametersOfSameType(method:Method):Boolean

Returns true if the specified Method has multiple parameters of the same type.

Parameters
method:Method — The specified Method.

Returns
Booleantrue if the given method has multiple parameters of the same type.
init()method 
protected function init(target:Object, method:Method, properties:Array):void

Initializes the current EventHandlerProxy.

Parameters
target:Object
 
method:Method
 
properties:Array
invoke()method 
public override function invoke():*

Invokes the event handler for the proxied method and decides what arguments to use, based on the metadata of event handler function.

Returns
*