Packageorg.spicefactory.parsley.core.registry.impl
Classpublic class DefaultObjectDefinitionRegistry
InheritanceDefaultObjectDefinitionRegistry Inheritance flash.events.EventDispatcher
Implements ObjectDefinitionRegistry, InitializingService

Default implementation of the ObjectDefinitionRegistry interface.



Public Properties
 PropertyDefined By
  builders : ObjectDefinitionBuilderFactory
[read-only] A factory for obtaining builders for object definitions.
DefaultObjectDefinitionRegistry
  context : Context
[read-only] The Context associated with this registry.
DefaultObjectDefinitionRegistry
  domain : ApplicationDomain
[read-only] The ApplicationDomain to use for reflection.
DefaultObjectDefinitionRegistry
  frozen : Boolean
[read-only] Indicates whether this registry has been frozen.
DefaultObjectDefinitionRegistry
  properties : ConfigurationProperties
[read-only] Properties that may be used to build or process ObjectDefinitions.
DefaultObjectDefinitionRegistry
  scopeManager : ScopeManager
[read-only]
DefaultObjectDefinitionRegistry
Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultObjectDefinitionRegistry
  
containsDefinition(id:String):Boolean
Checks whether this registry contains a definition with the specified id.
DefaultObjectDefinitionRegistry
  
freeze():void
Freezes this registry.
DefaultObjectDefinitionRegistry
  
getAllDefinitionsByType(type:Class):Array
Returns all definitions that match the specified type.
DefaultObjectDefinitionRegistry
  
Returns the definition with the specified id or null if no such definition exists.
DefaultObjectDefinitionRegistry
  
Returns the definition for the specified type or null if no such definition exists.
DefaultObjectDefinitionRegistry
  
getDefinitionCount(type:Class = null):uint
Returns the number of definitions in this registry that match the specified type.
DefaultObjectDefinitionRegistry
  
getDefinitionIds(type:Class = null):Array
Returns the ids of the definitions in this registry that match the specified type.
DefaultObjectDefinitionRegistry
  
init(info:BootstrapInfo):void
Invoked once after the service has been instantiated.
DefaultObjectDefinitionRegistry
  
Registers an object definition with this registry.
DefaultObjectDefinitionRegistry
  
Unregisters an object definition from this registry.
DefaultObjectDefinitionRegistry
Property Detail
buildersproperty
builders:ObjectDefinitionBuilderFactory  [read-only]

A factory for obtaining builders for object definitions.


Implementation
    public function get builders():ObjectDefinitionBuilderFactory
contextproperty 
context:Context  [read-only]

The Context associated with this registry. During processing of ObjectDefinitions the configured property of the Context is still false and any attempt to fetch objects from the Context will lead to an Error. It is primarily exposed in case an extension wants to keep a reference to the Context for later use.


Implementation
    public function get context():Context
domainproperty 
domain:ApplicationDomain  [read-only]

The ApplicationDomain to use for reflection.


Implementation
    public function get domain():ApplicationDomain
frozenproperty 
frozen:Boolean  [read-only]

Indicates whether this registry has been frozen. When true any attempt to modify this registry or any of the definitions it contains will lead to an Error.


Implementation
    public function get frozen():Boolean
propertiesproperty 
properties:ConfigurationProperties  [read-only]

Properties that may be used to build or process ObjectDefinitions.


Implementation
    public function get properties():ConfigurationProperties
scopeManagerproperty 
scopeManager:ScopeManager  [read-only]


Implementation
    public function get scopeManager():ScopeManager
Constructor Detail
DefaultObjectDefinitionRegistry()Constructor
public function DefaultObjectDefinitionRegistry()

Creates a new instance.

Method Detail
containsDefinition()method
public function containsDefinition(id:String):Boolean

Checks whether this registry contains a definition with the specified id.

Parameters

id:String — the id to check

Returns
Boolean — true if this registry contains an definition with the specified id
freeze()method 
public function freeze():void

Freezes this registry. After calling this method any attempt to modify this registry or any of the definitions it contains will lead to an Error.

getAllDefinitionsByType()method 
public function getAllDefinitionsByType(type:Class):Array

Returns all definitions that match the specified type. This includes subclasses or objects implementing the interface in case the type parmeter is an interface. When no match is found an empty Array will be returned.

Parameters

type:Class — the type for which all definitions should be returned

Returns
Array — all definitions that match the specified type
getDefinition()method 
public function getDefinition(id:String):ObjectDefinition

Returns the definition with the specified id or null if no such definition exists.

Parameters

id:String — the id of the definition

Returns
ObjectDefinition — the definition with the specified id
getDefinitionByType()method 
public function getDefinitionByType(type:Class):ObjectDefinition

Returns the definition for the specified type or null if no such definition exists. This method will throw an Error if it finds more than one match.

Parameters

type:Class — the type for which the definition should be returned

Returns
ObjectDefinition — the definition for the specified type
getDefinitionCount()method 
public function getDefinitionCount(type:Class = null):uint

Returns the number of definitions in this registry that match the specified type. If the type parameter is omitted the number of all definitions in this registry will be returned.

Parameters

type:Class (default = null) — the type to check for matches

Returns
uint — the number of definitions in this registry that match the specified type
getDefinitionIds()method 
public function getDefinitionIds(type:Class = null):Array

Returns the ids of the definitions in this registry that match the specified type. If the type parameter is omitted the ids of all definitions in this registry will be returned.

Parameters

type:Class (default = null) — the type to check for matches

Returns
Array — the ids of the definitions in this registry that match the specified type
init()method 
public function init(info:BootstrapInfo):void

Invoked once after the service has been instantiated. The BootstrapInfo instance passed to this method gives access to the settings and collaborating services.

Parameters

info:BootstrapInfo — the environment of the Context building process

registerDefinition()method 
public function registerDefinition(definition:ObjectDefinition):void

Registers an object definition with this registry.

Parameters

definition:ObjectDefinition — the definition to add to this registry

unregisterDefinition()method 
public function unregisterDefinition(definition:ObjectDefinition):void

Unregisters an object definition from this registry.

Parameters

definition:ObjectDefinition — the definition to remove from this registry