Package | mx.core |
Class | public class DeferredInstanceFromClass |
Inheritance | DeferredInstanceFromClass Object |
Implements | ITransientDeferredInstance |
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
getInstance()
method to
create an instance of the class when it is first needed and get
a reference to the instance thereafter.
See also
Method | Defined By | ||
---|---|---|---|
DeferredInstanceFromClass(generator:Class)
Constructor. | DeferredInstanceFromClass | ||
getInstance():Object
Creates and returns an instance of the class specified in the
DeferredInstanceFromClass constructor, if it does not yet exist;
otherwise, returns the already-created class instance. | DeferredInstanceFromClass | ||
reset():void
Resets the state of our factory to the initial, uninitialized state. | DeferredInstanceFromClass |
DeferredInstanceFromClass | () | Constructor |
public function DeferredInstanceFromClass(generator:Class)
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Constructor.
Parametersgenerator:Class — The class whose instance the getInstance()
method creates and returns.
|
getInstance | () | method |
public function getInstance():Object
Language Version : | ActionScript 3.0 |
Product Version : | Flex 3 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Creates and returns an instance of the class specified in the DeferredInstanceFromClass constructor, if it does not yet exist; otherwise, returns the already-created class instance.
ReturnsObject — An instance of the class specified in the
DeferredInstanceFromClass constructor.
|
reset | () | method |
public function reset():void
Language Version : | ActionScript 3.0 |
Product Version : | Flex 4 |
Runtime Versions : | Flash Player 9, AIR 1.1 |
Resets the state of our factory to the initial, uninitialized state. The reference to our cached instance is cleared.