Package | org.spicefactory.parsley.core.builder.impl |
Class | public class ObjectDefinitionContext |
Inheritance | ObjectDefinitionContext Object |
Property | Defined By | ||
---|---|---|---|
registry : ObjectDefinitionRegistry [read-only]
The registry associated with the definition. | ObjectDefinitionContext | ||
targetType : ClassInfo [read-only]
The type of the class to be configured. | ObjectDefinitionContext |
Method | Defined By | ||
---|---|---|---|
Creates a new instance. | ObjectDefinitionContext | ||
addBuilderPart(part:ObjectDefinitionBuilderPart):void
Adds a part to the builder that gets executed when building the final definition. | ObjectDefinitionContext | ||
processDefinition(target:ObjectDefinition, additionalDecorators:Array, builder:ObjectDefinitionBuilder):ObjectDefinition
Processes the specified definition, applying all builder parts added to this
context, all decorators assembled by this context and the specified additional decorators
and finally invoking the definition replacer (if specified). | ObjectDefinitionContext | ||
setDefinitionReplacer(replacer:ObjectDefinitionReplacer):void
Sets the instance that will replace (or wrap) the final object definition. | ObjectDefinitionContext | ||
setInstantiator(instantiator:ObjectInstantiator):void
Sets the instantiator to apply to the target definition. | ObjectDefinitionContext |
Method | Defined By | ||
---|---|---|---|
processDecorators(definition:ObjectDefinition, additionalDecorators:Array, builder:ObjectDefinitionBuilder):void
Processes the decorators for this builder. | ObjectDefinitionContext |
registry | property |
registry:ObjectDefinitionRegistry
[read-only] The registry associated with the definition.
public function get registry():ObjectDefinitionRegistry
targetType | property |
targetType:ClassInfo
[read-only] The type of the class to be configured.
public function get targetType():ClassInfo
ObjectDefinitionContext | () | Constructor |
public function ObjectDefinitionContext(targetType:ClassInfo, registry:ObjectDefinitionRegistry, assemblers:Array)
Creates a new instance.
ParameterstargetType:ClassInfo — the type of the target object
| |
registry:ObjectDefinitionRegistry — the registry the definition is associated with
| |
assemblers:Array — the assemblers to use to assemble the decorators for the target definition
|
addBuilderPart | () | method |
public function addBuilderPart(part:ObjectDefinitionBuilderPart):void
Adds a part to the builder that gets executed when building the final definition.
Parameters
part:ObjectDefinitionBuilderPart — the part to add to the builder
|
processDecorators | () | method |
protected function processDecorators(definition:ObjectDefinition, additionalDecorators:Array, builder:ObjectDefinitionBuilder):void
Processes the decorators for this builder. This implementation processes all decorators obtained
through the decorator assemblers registered for the core Configuration
instance
(usually one assembler processing metadata tags)
along with decorators which were explicitly added,
possibly through some additional configuration mechanism like MXML or XML.
Parameters
definition:ObjectDefinition — the definition to process
| |
additionalDecorators:Array — the decorators to process in addition to the ones added through the assemblers
| |
builder:ObjectDefinitionBuilder — the builder for the definition
|
processDefinition | () | method |
public function processDefinition(target:ObjectDefinition, additionalDecorators:Array, builder:ObjectDefinitionBuilder):ObjectDefinition
Processes the specified definition, applying all builder parts added to this context, all decorators assembled by this context and the specified additional decorators and finally invoking the definition replacer (if specified). If no replacer was specified this method usually should return the definition that was passed in.
Parameters
target:ObjectDefinition — the target definition to process
| |
additionalDecorators:Array — decorators to add to the ones extracted by the standard assemblers
| |
builder:ObjectDefinitionBuilder — the builder of the specified definition
|
ObjectDefinition — the final definition to use
|
setDefinitionReplacer | () | method |
public function setDefinitionReplacer(replacer:ObjectDefinitionReplacer):void
Sets the instance that will replace (or wrap) the final object definition. This is an advanced feature. From all the builtin tags only the Factory tag uses this hook.
Parameters
replacer:ObjectDefinitionReplacer — the instance that will replace the final object definition
|
setInstantiator | () | method |
public function setInstantiator(instantiator:ObjectInstantiator):void
Sets the instantiator to apply to the target definition.
Parameters
instantiator:ObjectInstantiator — the instantiator to apply to the target definition
|