Package | org.spicefactory.parsley.view |
Class | public class FastInject |
Inheritance | FastInject Object |
<FastInject>
MXML tag for MXML components.
Method | Defined By | ||
---|---|---|---|
autoremove(value:Boolean):FastInject
Indicates whether the injected object should be removed from the Context
when the view is removed from the stage and the injected object is a DynamicObject. | FastInject | ||
complete(callback:Function):FastInject
A callback to invoke when the injection has been completed. | FastInject | ||
execute():void
Triggers the (potentially asynchronous) injection. | FastInject | ||
The instance that controls the lifecycle of the view. | FastInject | ||
objectId(objectId:String):FastInject
The id the object to inject is configured with in the Parsley Context. | FastInject | ||
property(property:String):FastInject
The name of the property of the target to inject into. | FastInject | ||
reuse(value:Boolean):FastInject
Indicates whether the target instance will be reused in subsequent
lifecycles of the view. | FastInject | ||
target(target:Object):FastInject
The target to inject into. | FastInject | ||
type(type:Class):FastInject
The type of the object to inject from the nearest Parsley Context. | FastInject | ||
view(view:DisplayObject):FastInject [static]
The view that demarcates the lifecycle of the target instance to inject into. | FastInject |
autoremove | () | method |
public function autoremove(value:Boolean):FastInject
Indicates whether the injected object should be removed from the Context
when the view is removed from the stage and the injected object is a DynamicObject.
Only has an effect when no custom ViewLifecycle
has been set.
Parameters
value:Boolean — Indicates whether the injected object should be removed from the Context
when the view is removed from the stage and the injected object is a DynamicObject
|
FastInject — this FastInject instance for method chaining
|
complete | () | method |
public function complete(callback:Function):FastInject
A callback to invoke when the injection has been completed.
Parameters
callback:Function — a callback to invoke when the injection has been completed
|
FastInject — this FastInject instance for method chaining
|
execute | () | method |
public function execute():void
Triggers the (potentially asynchronous) injection.
lifecycle | () | method |
public function lifecycle(lifecycle:ViewLifecycle):FastInject
The instance that controls the lifecycle of the view. This property may be null, in this case the default lifecycle installed in the Context for the type of view of this configuration will be used.
Parameters
lifecycle:ViewLifecycle — the instance that controls the lifecycle of the view
|
FastInject — this FastInject instance for method chaining
|
objectId | () | method |
public function objectId(objectId:String):FastInject
The id the object to inject is configured with in the Parsley Context.
FastInject can do either injection by type or by id. Thus either this
method or type
must be called.
Parameters
objectId:String — the id the object to inject is configured with in the Parsley Context
|
FastInject — this FastInject instance for method chaining
|
property | () | method |
public function property(property:String):FastInject
The name of the property of the target to inject into.
Parameters
property:String — name of the property of the target to inject into
|
FastInject — this FastInject instance for method chaining
|
reuse | () | method |
public function reuse(value:Boolean):FastInject
Indicates whether the target instance will be reused in subsequent lifecycles of the view. When set to false the injection will only be processed once. This value should be true if the application keeps instances of the view in memory and adds them back to the stage later. It should be false if the view will get garbage collected once it has been removed from the stage.
Parameters
value:Boolean — indicates whether the target instance will be reused in subsequent
lifecycles of the view
|
FastInject — this FastInject instance for method chaining
|
target | () | method |
public function target(target:Object):FastInject
The target to inject into.
Parameters
target:Object — the target to get processed by the nearest Context in the view hierarchy
|
FastInject — this FastInject instance for method chaining
|
type | () | method |
public function type(type:Class):FastInject
The type of the object to inject from the nearest Parsley Context.
FastInject can do either injection by type or by id. Thus either this
method or objectId
must be called.
Parameters
type:Class — the type of the object to inject from the nearest Parsley Context
|
FastInject — this FastInject instance for method chaining
|
view | () | method |
public static function view(view:DisplayObject):FastInject
The view that demarcates the lifecycle of the target instance to inject into. The view may be the same instance as the target itself or a different one that just controls the lifecycle. A typical example for the two properties pointing to different instances would be the target being a presentation model that should get added to the Context for the time the view it belongs to is on the stage.
Parameters
view:DisplayObject — the view that demarcates the lifecycle of the target instance
|
FastInject — a new Configure instance for further setup options
|