Packageorg.springextensions.actionscript.ioc.factory.support
SVN browsingIObjectDefinitionRegistry.as
FisheyeIObjectDefinitionRegistry.as
Interfacepublic interface IObjectDefinitionRegistry
SubinterfacesIListableObjectFactory, IXMLObjectFactory
ImplementorsDefaultListableObjectFactory, SimpleObjectDefinitionRegistry

Defines the interface for an object definition registry. This interface contains add methods needed to work with object definitions.



Public Properties
 PropertyDefined by
  numObjectDefinitions : uint
[read-only] The number of object definitions in this registry.
IObjectDefinitionRegistry
  objectDefinitionNames : Array
[read-only] The names of the registered object definitions.
IObjectDefinitionRegistry
Public Methods
 MethodDefined by
  
containsObjectDefinition(objectName:String):Boolean
Determines if an object definition with the given name exists
IObjectDefinitionRegistry
  
Returns the object definition registered with the given name.
IObjectDefinitionRegistry
  
getObjectDefinitionsOfType(type:Class):Array
Returns the object definitions in this registry that are of the specified Class.
IObjectDefinitionRegistry
  
getUsedTypes():Array
Returns a unique list of all Classes that are used by the IObjectDefinitions in the current IObjectDefinitionRegistry.
IObjectDefinitionRegistry
  
registerObjectDefinition(objectName:String, objectDefinition:IObjectDefinition):void
Registers the given objectDefinition under the given name.
IObjectDefinitionRegistry
  
removeObjectDefinition(objectName:String):void
Removes the definition with the given name from the registry
IObjectDefinitionRegistry
Property detail
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
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

Throws
NoSuchObjectDefinitionError — if the object definition was not found in the registry
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