Package | org.spicefactory.parsley.core.registry.impl |
Class | public class DefaultObjectDefinitionRegistry |
Inheritance | DefaultObjectDefinitionRegistry flash.events.EventDispatcher |
Implements | ObjectDefinitionRegistry, InitializingService |
Property | Defined 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 |
Method | Defined 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 | ||
getDefinition(id:String):ObjectDefinition
Returns the definition with the specified id or null if no such definition exists. | DefaultObjectDefinitionRegistry | ||
getDefinitionByType(type:Class):ObjectDefinition
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 | ||
registerDefinition(definition:ObjectDefinition):void
Registers an object definition with this registry. | DefaultObjectDefinitionRegistry | ||
unregisterDefinition(definition:ObjectDefinition):void
Unregisters an object definition from this registry. | DefaultObjectDefinitionRegistry |
builders | property |
builders:ObjectDefinitionBuilderFactory
[read-only] A factory for obtaining builders for object definitions.
public function get builders():ObjectDefinitionBuilderFactory
context | property |
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.
public function get context():Context
domain | property |
domain:ApplicationDomain
[read-only] The ApplicationDomain to use for reflection.
public function get domain():ApplicationDomain
frozen | property |
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.
public function get frozen():Boolean
properties | property |
properties:ConfigurationProperties
[read-only] Properties that may be used to build or process ObjectDefinitions.
public function get properties():ConfigurationProperties
scopeManager | property |
scopeManager:ScopeManager
[read-only]
public function get scopeManager():ScopeManager
DefaultObjectDefinitionRegistry | () | Constructor |
public function DefaultObjectDefinitionRegistry()
Creates a new instance.
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
|
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
|
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
|
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
|
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
|
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
|
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
|