| Pacchetto | mx.core |
| Classe | public class DeferredInstanceFromFunction |
| Ereditarietà | DeferredInstanceFromFunction Object |
| Implementa | ITransientDeferredInstance |
| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
getInstance() method to
create an instance of an object when it is first needed and get
a reference to the object thereafter.
Elementi API correlati
Proprietà pubbliche
Metodi pubblici
| Metodo | Definito da | ||
|---|---|---|---|
Constructor. | DeferredInstanceFromFunction | ||
Returns a reference to an instance of the desired object. | DeferredInstanceFromFunction | ||
![]() |
Indica se per un oggetto è definita una proprietà specifica. | Object | |
![]() |
Indica se un'istanza della classe Object si trova nella catena di prototipi dell'oggetto specificato come parametro. | Object | |
![]() |
Indica se la proprietà specificata esiste ed è enumerabile. | Object | |
Resets the state of our factory to the initial, uninitialized state. | DeferredInstanceFromFunction | ||
![]() |
Imposta la disponibilità di una proprietà dinamica per le operazioni cicliche. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa di questo oggetto, formattato in base alle convenzioni specifiche per le versioni localizzate. | Object | |
![]() |
Restituisce la rappresentazione in formato stringa dell'oggetto specificato. | Object | |
![]() |
Restituisce il valore di base dell'oggetto specificato. | Object | |
Descrizione della funzione di costruzione
DeferredInstanceFromFunction | () | Funzione di costruzione |
public function DeferredInstanceFromFunction(generator:Function, destructor:Function = null)| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
Constructor.
Parametrigenerator:Function — A function that creates and returns an instance
of the required object.
| |
destructor:Function (default = null) — An optional function used to cleanup outstanding
references when reset() is called.
|
Descrizione dei metodi
getInstance | () | metodo |
public function getInstance():Object| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 3 |
| Versioni runtime: | Flash Player 9, AIR 1.1 |
Returns a reference to an instance of the desired object.
If no instance of the required object exists, calls the function
specified in this class' generator constructor parameter.
Object — An instance of the object.
|
reset | () | metodo |
public function reset():void| Versione linguaggio: | ActionScript 3.0 |
| Versione prodotto: | Flex 4 |
| Versioni runtime: | 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.
Tue Jun 12 2018, 02:44 PM Z
Nascondi proprietà pubbliche ereditate
Mostra proprietà pubbliche ereditate