Package | com.asfusion.mate.actionLists |
Class | public class Injectors |
Inheritance | Injectors AbstractHandlers flash.events.EventDispatcher |
Injectors
defined in the EventMap
will run whenever an instance of the
class specified in the Injectors
's "target" argument is created.
Property | Defined by | ||
---|---|---|---|
actions : Array
An array of Actions (IAction) contained in this IActionList.
| AbstractHandlers | ||
debug : Boolean
Whether to show debugging information for this IActionList.
| AbstractHandlers | ||
dispatcherType : String
String that defines whether the dispatcher used by this tag is
global or
inherit . | AbstractHandlers | ||
includeDerivatives : Boolean
If this property is true, the injector will inject not only the Class in the
target property, but also all the classes that extend from that class.
| Injectors | ||
scope : IScope
Returns the current scope for this IActionList
| AbstractHandlers | ||
target : Class
The class that, when an object is created, should trigger the
InjectorHandlers to run. | Injectors | ||
targets : Array
An array of classes that, when an object is created, should trigger the
InjectorHandlers to run. | Injectors |
Property | Defined by | ||
---|---|---|---|
currentDispatcher : IEventDispatcher | AbstractHandlers | ||
dispatcherTypeChanged : Boolean
Flag indicating whether the
dispatcherType has been changed and needs invalidation. | AbstractHandlers | ||
document : Object
Internal storage for the document object.
| AbstractHandlers | ||
includeDerivativesChanged : Boolean
Flag indicating if the includeDerivatives property has been changed.
| Injectors | ||
inheritedScope : IScope
Parent scope that is passed to the IActionList when it is a sub-ActionList.
| AbstractHandlers | ||
manager : IMateManager
Internal instance of
IMateManager . | AbstractHandlers | ||
map : IEventMap
Internal instance of
IEventMap . | AbstractHandlers | ||
targetRegistered : Boolean
Flag indicating if this
InjectorHandlers is registered to listen to a target or not. | Injectors | ||
targetsRegistered : Boolean
Flag indicating if this
InjectorHandlers is registered to listen to a target list or not. | Injectors |
Method | Defined by | ||
---|---|---|---|
Constructor
| Injectors | ||
clearReferences():void
Unregister as a listener and prepare to be garbage collected
| AbstractHandlers | ||
errorString():String
Retuns an error String to be used by the debugger.
| Injectors | ||
getDocument():Object
A reference to the document object associated with this IActionList.
| AbstractHandlers | ||
getGroupId():int
Method to get the group id.
| AbstractHandlers | ||
initialized(document:Object, id:String):void
Called automatically by the MXML compiler if the IActionList is set up using a tag.
| AbstractHandlers | ||
invalidateProperties():void
Marks a component so that its
commitProperties method gets called during a later screen update. | AbstractHandlers | ||
setDispatcher(value:IEventDispatcher, local:Boolean = true):void
A method that allows setting the dispatcher
that this IActionList will use to register to events.
| Injectors | ||
setGroupId(id:int):void
Method to set the group id.
| AbstractHandlers | ||
setInheritedScope(inheritedScope:IScope):void
You can pass the parent scope to this IActionList to copy the inherited values.
| AbstractHandlers | ||
validateNow():void
Validate and update the properties of this object, if necessary.
| AbstractHandlers |
Method | Defined by | ||
---|---|---|---|
commitProperties():void
Processes the properties set on the component.
| Injectors | ||
dispatcherChangeHandler(event:DispatcherEvent):void
A handler for the mate dispatcher changed.
| AbstractHandlers | ||
fireEvent(event:InjectorEvent):void
Called by the dispacher when the event gets triggered.
| Injectors | ||
injectDerivativesHandler(event:InjectorEvent):void
This function is a handler for the injection event, if the target it is a
derivative class the injection gets triggered
| Injectors | ||
isDerivative(injectorTarget:Object, targetClass:*):Boolean
Check if the current object is a derivative class and return a boolean value
true / false.
| Injectors | ||
runSequence(scope:IScope, actionList:Array):void
Goes over all the listeners (
IAction s)
and calls the method trigger on them, passing the scope as an argument. | AbstractHandlers | ||
Set the scope on this IActionList.
| AbstractHandlers | ||
unregister():void
Unregisters a target or targets.
| Injectors |
includeDerivatives | property |
includeDerivatives:Boolean
[read-write]If this property is true, the injector will inject not only the Class in the target property, but also all the classes that extend from that class. If the target is an interface, it will inject all the objects that implement the interface.
The default value is false
.
public function get includeDerivatives():Boolean
public function set includeDerivatives(value:Boolean):void
includeDerivativesChanged | property |
protected var includeDerivativesChanged:Boolean
Flag indicating if the includeDerivatives property has been changed.
target | property |
target:Class
[read-write]
The class that, when an object is created, should trigger the InjectorHandlers
to run.
The default value is null
.
public function get target():Class
public function set target(value:Class):void
targetRegistered | property |
protected var targetRegistered:Boolean
Flag indicating if this InjectorHandlers
is registered to listen to a target or not.
targets | property |
targets:Array
[read-write]
An array of classes that, when an object is created, should trigger the InjectorHandlers
to run.
The default value is true
.
public function get targets():Array
public function set targets(value:Array):void
targetsRegistered | property |
protected var targetsRegistered:Boolean
Flag indicating if this InjectorHandlers
is registered to listen to a target list or not.
Injectors | () | constructor |
public function Injectors()
Constructor
commitProperties | () | method |
protected override function commitProperties():void
Processes the properties set on the component.
errorString | () | method |
public override function errorString():String
Retuns an error String to be used by the debugger.
ReturnsString |
fireEvent | () | method |
protected function fireEvent(event:InjectorEvent):void
Called by the dispacher when the event gets triggered. This method creates a scope and then runs the sequence.
Parametersevent:InjectorEvent |
injectDerivativesHandler | () | method |
protected function injectDerivativesHandler(event:InjectorEvent):void
This function is a handler for the injection event, if the target it is a derivative class the injection gets triggered
Parametersevent:InjectorEvent |
isDerivative | () | method |
protected function isDerivative(injectorTarget:Object, targetClass:*):Boolean
Check if the current object is a derivative class and return a boolean value true / false.
ParametersinjectorTarget:Object |
|
targetClass:* |
Boolean |
setDispatcher | () | method |
public override function setDispatcher(value:IEventDispatcher, local:Boolean = true):void
A method that allows setting the dispatcher that this IActionList will use to register to events.
Parametersvalue:IEventDispatcher |
|
local:Boolean (default = true )
|
unregister | () | method |
protected function unregister():void
Unregisters a target or targets. Used internally whenever a new target/s is set or dispatcher changes.