| Package | com.yahoo.astra.utils |
| Class | public class InstanceFactory |
| Property | Defined by | ||
|---|---|---|---|
| methods : Object
A set of methods to call once the object has been created and
properties have been initialized.
| InstanceFactory | ||
| properties : Object
The initial values to pass to the properties of the
newly-instantiated object.
| InstanceFactory | ||
| targetClass : Class
The class that will be instantiated.
| InstanceFactory | ||
| Method | Defined by | ||
|---|---|---|---|
|
InstanceFactory(targetClass:Class, properties:Object = null, methods:Object = null)
Constructor.
| InstanceFactory | ||
|
createInstance():Object
Creates a new instance of the target class and initializes it.
| InstanceFactory | ||
|
restoreInstance(instance:Object):void
Initializes an object with the properties and methods.
| InstanceFactory | ||
| methods | property |
methods:Object [read-write]A set of methods to call once the object has been created and properties have been initialized. Format is a set of key-value pairs where the key is the name of the method and the value is an Array of parameter values.
Example: { load: [ "image.gif" ] }
public function get methods():Object
public function set methods(value:Object):void
| properties | property |
properties:Object [read-write]The initial values to pass to the properties of the newly-instantiated object.
Implementation public function get properties():Object
public function set properties(value:Object):void
| targetClass | property |
targetClass:Class [read-write]The class that will be instantiated.
Implementation public function get targetClass():Class
public function set targetClass(value:Class):void
| InstanceFactory | () | constructor |
public function InstanceFactory(targetClass:Class, properties:Object = null, methods:Object = null)Constructor.
ParameterstargetClass:Class |
|
properties:Object (default = null) |
|
methods:Object (default = null) |
| createInstance | () | method |
public function createInstance():ObjectCreates a new instance of the target class and initializes it.
ReturnsObject |
| restoreInstance | () | method |
public function restoreInstance(instance:Object):void
Initializes an object with the properties and methods. The object
must be an instance of the targetClass property, or
this method will throw an ArgumentError.
instance:Object |