| Package | org.springextensions.actionscript.ioc.factory |
| Interface | public interface IInstanceCache extends flash.events.IEventDispatcher |
| Implementors | DefaultInstanceCache |
| Method | Defined By | ||
|---|---|---|---|
clearCache():void
Removes all the instances from the cache. | IInstanceCache | ||
getCachedNames():Vector.<String>
Returns a Vector.<String> of all the names of the cached objects in the current IInstanceCache. | IInstanceCache | ||
getInstance(name:String):*
Returns the instance that was associated with the specified name. | IInstanceCache | ||
getPreparedInstance(name:String):*
Returns the prepared instance that was associated with the specified name. | IInstanceCache | ||
hasInstance(name:String):Boolean
Returns true if an instance has been associated with the specified name
| IInstanceCache | ||
isPrepared(name:String):Boolean | IInstanceCache | ||
numInstances():uint
Returns the number of instances that have been added to the cache. | IInstanceCache | ||
prepareInstance(name:String, instance:*):void | IInstanceCache | ||
putInstance(name:String, instance:*):void
Adds the specified instance using the specified name. | IInstanceCache | ||
removeInstance(name:String):*
Removes the instance that was associated with the specified name. | IInstanceCache | ||
| clearCache | () | method |
public function clearCache():voidRemoves all the instances from the cache.
| getCachedNames | () | method |
public function getCachedNames():Vector.<String>
Returns a Vector.<String> of all the names of the cached objects in the current IInstanceCache.
Vector.<String> |
| getInstance | () | method |
public function getInstance(name:String):*Returns the instance that was associated with the specified name.
Parameters
name:String — The specified name
|
* — The instance associated with the specified name
|
ObjectDefinitionNotFoundError — Thrown when an object with the specified name does not exist
|
| getPreparedInstance | () | method |
public function getPreparedInstance(name:String):*Returns the prepared instance that was associated with the specified name.
Parameters
name:String — The specified name
|
* — The prepared instance associated with the specified name
|
ObjectDefinitionNotFoundError — Thrown when a prepared object with the specified name does not exist
|
| hasInstance | () | method |
public function hasInstance(name:String):Boolean
Returns true if an instance has been associated with the specified name
Parameters
name:String — The specified name
|
Boolean — true if an instance has been associated with the specified name
|
| isPrepared | () | method |
public function isPrepared(name:String):Boolean
Parameters
name:String |
Boolean —
|
| numInstances | () | method |
public function numInstances():uintReturns the number of instances that have been added to the cache.
Returnsuint — The number of instances that have been added to the cache.
|
| prepareInstance | () | method |
public function prepareInstance(name:String, instance:*):void
Parameters
name:String | |
instance:* |
| putInstance | () | method |
public function putInstance(name:String, instance:*):voidAdds the specified instance using the specified name.
Parameters
name:String — The specified name
| |
instance:* — The specified instance
|
See also
| removeInstance | () | method |
public function removeInstance(name:String):*Removes the instance that was associated with the specified name.
Parameters
name:String — The specified name
|
* |