Packageorg.springextensions.actionscript.ioc.factory.support
SVN browsingSimpleObjectDefinitionRegistry.as
FisheyeSimpleObjectDefinitionRegistry.as
Classpublic class SimpleObjectDefinitionRegistry
ImplementsIApplicationDomainAware, IObjectDefinitionRegistry
SubclassesObjectDefinitions

Basic implementation of the IObjectDefinitionRegistry interface.



Public Properties
 PropertyDefined by
  applicationDomain : ApplicationDomain
SimpleObjectDefinitionRegistry
  numObjectDefinitions : uint
[read-only] The number of object definitions in this registry.
SimpleObjectDefinitionRegistry
  objectDefinitionNames : Array
[read-only] The names of the registered object definitions.
SimpleObjectDefinitionRegistry
Public Methods
 MethodDefined by
  
Creates a new SimpleObjectDefinitionRegistry instance.
SimpleObjectDefinitionRegistry
  
containsObjectDefinition(objectName:String):Boolean
Determines if an object definition with the given name exists
SimpleObjectDefinitionRegistry
  
Returns the object definition registered with the given name.
SimpleObjectDefinitionRegistry
  
getObjectDefinitionsOfType(type:Class):Array
Returns the object definitions in this registry that are of the specified Class.
SimpleObjectDefinitionRegistry
  
getUsedTypes():Array
Returns a unique list of all Classes that are used by the IObjectDefinitions in the current IObjectDefinitionRegistry.
SimpleObjectDefinitionRegistry
  
registerObjectDefinition(objectName:String, objectDefinition:IObjectDefinition):void
Registers the given objectDefinition under the given name.
SimpleObjectDefinitionRegistry
  
removeObjectDefinition(objectName:String):void
Removes the definition with the given name from the registry
SimpleObjectDefinitionRegistry
Property detail
applicationDomainproperty
applicationDomain:ApplicationDomain  [read-write]Implementation
    public function get applicationDomain():ApplicationDomain
    public function set applicationDomain(value:ApplicationDomain):void
numObjectDefinitionsproperty 
numObjectDefinitions:uint  [read-only]

The number of object definitions in this registry.

Implementation
    public function get numObjectDefinitions():uint
objectDefinitionNamesproperty 
objectDefinitionNames:Array  [read-only]

The names of the registered object definitions.

Implementation
    public function get objectDefinitionNames():Array
Constructor detail
SimpleObjectDefinitionRegistry()constructor
public function SimpleObjectDefinitionRegistry()

Creates a new SimpleObjectDefinitionRegistry instance.

Method detail
containsObjectDefinition()method
public function containsObjectDefinition(objectName:String):Boolean

Determines if an object definition with the given name exists

Parameters
objectName:String — The name/id of the object definition

Returns
Boolean
getObjectDefinition()method 
public function getObjectDefinition(objectName:String):IObjectDefinition

Returns the object definition registered with the given name. If the object definition does not exist undefined will be returned.

Parameters
objectName:String — the name/id of the definition to retrieve

Returns
IObjectDefinition — the registered object definition
getObjectDefinitionsOfType()method 
public function getObjectDefinitionsOfType(type:Class):Array

Returns the object definitions in this registry that are of the specified Class.

Parameters
type:Class — The specified Class that is searched for.

Returns
Array — an array containing definitions that implement the specified Class.
getUsedTypes()method 
public function getUsedTypes():Array

Returns a unique list of all Classes that are used by the IObjectDefinitions in the current IObjectDefinitionRegistry.

Returns
Array — A unique list of all Classes.
registerObjectDefinition()method 
public function registerObjectDefinition(objectName:String, objectDefinition:IObjectDefinition):void

Registers the given objectDefinition under the given name.

Parameters
objectName:String — the name under which the object definition should be stored
 
objectDefinition:IObjectDefinition — the object definition to store
removeObjectDefinition()method 
public function removeObjectDefinition(objectName:String):void

Removes the definition with the given name from the registry

Parameters
objectName:String — The name/id of the definition to remove