Package | com.asfusion.mate.actions.builders |
Class | public class ObjectBuilder |
Inheritance | ObjectBuilder BaseAction AbstractAction |
Implements | IAction, IBuilder |
Subclasses | CommandInvoker, EventAnnouncer, MethodInvoker, PropertySetter |
generator
property
to create instances. The generator
is the class template to use to instantiate new objects.
Property | Defined by | ||
---|---|---|---|
cache : String
The cache attribute lets you specify whether this newly created object should be kept live
so that the next time an instance of this class is requested, this already created object
is returned instead.
| ObjectBuilder | ||
constructorArguments : *
The constructorArgs allows you to pass an Object or an Array of objects to the contructor
when the instance is created.
| ObjectBuilder | ||
generator : Class
The generator attribute specifies what class should be instantiated.
| ObjectBuilder | ||
properties : ArrayProperties allows you to add properties to the currentInstance . | BaseAction | ||
registerTarget : Boolean
Registers the newly created object as an injector target.
| ObjectBuilder |
Method | Defined by | ||
---|---|---|---|
The last method that
trigger calls. | AbstractAction | ||
createInstance(scope:IScope):Object
Where the currentInstance is created using the
generator class as the template, passing arguments to the constructor
as specified by the constructorArgs (if any). | ObjectBuilder | ||
The first method that
trigger calls. | ObjectBuilder | ||
Where all the action occurs.
| ObjectBuilder | ||
setProperties(scope:IScope):void
Where all the properties are set into the
currentInstance . | BaseAction |
cache | property |
cache:String
[read-write]The cache attribute lets you specify whether this newly created object should be kept live so that the next time an instance of this class is requested, this already created object is returned instead.
The default value is inherit
.
public function get cache():String
public function set cache(value:String):void
constructorArguments | property |
constructorArguments:*
[read-write]The constructorArgs allows you to pass an Object or an Array of objects to the contructor when the instance is created.
You can use an array to pass multiple arguments or use a simple Object if your signature has only one parameter.
The default value is undefined
.
public function get constructorArguments():*
public function set constructorArguments(value:*):void
generator | property |
generator:Class
[read-write]The generator attribute specifies what class should be instantiated.
Implementation public function get generator():Class
public function set generator(value:Class):void
registerTarget | property |
registerTarget:Boolean
[read-write]
Registers the newly created object as an injector target. If true, this allows this object to be injected
with properties using the Injectors
tags.
public function get registerTarget():Boolean
public function set registerTarget(value:Boolean):void
createInstance | () | method |
protected function createInstance(scope:IScope):Object
Where the currentInstance is created using the
generator
class as the template, passing arguments to the constructor
as specified by the constructorArgs
(if any).
scope:IScope |
Object |
prepare | () | method |
protected override function prepare(scope:IScope):void
The first method that trigger
calls.
Usually, this is where the currentInstance
is created or set if needed.
In this method you can also perform any code that must be done first.
scope:IScope |
run | () | method |
protected override function run(scope:IScope):void
Where all the action occurs. At this moment, the currentInstance
is already instantiated and all the properties are already set.
scope:IScope |