Packageorg.spicefactory.parsley.inject.tag
Classpublic class DynamicPropertyTag
InheritanceDynamicPropertyTag Inheritance PropertyTag Inheritance ObjectReferenceTag Inheritance Object
Implements ObjectDefinitionDecorator

Represent the value for a dynamic property. Can be used in MXML and XML configuration.

This allows values to be set on dynamic objects like a Dictionary or a generic Object. Since reflection on dynamic properties is not possible, injection by type is not supported by this tag. In all cases where the property is not dynamic, the regular Property tag should be preferred.

Default MXML Propertyvalue



Public Properties
 PropertyDefined By
 InheritedchildValue : *
The value of the property mapped as a child element.
PropertyTag
 InheritedidRef : String
The id of the referenced object.
ObjectReferenceTag
 Inheritedname : String
The name of the property.
PropertyTag
 Inheritedrequired : Boolean = true
Indicates whether this instance represents a required dependency.
ObjectReferenceTag
 InheritedtypeRef : Class
The type of the referenced object.
ObjectReferenceTag
 Inheritedvalue : *
The value of the property mapped as an attribute.
PropertyTag
Public Methods
 MethodDefined By
  
[override] Method to be invoked by the container for each configuration tag it encounters for an object that was added to the container.
DynamicPropertyTag
 Inherited
Returns the resolved value represented by this element.
ObjectReferenceTag
Protected Methods
 MethodDefined By
 Inherited
validate():void
Validates the properties of this tag instance.
PropertyTag
Protected Constants
 ConstantDefined By
 InheritedvalueResolver : ConfigurationValueResolver
[static] The resolver for value declarations.
PropertyTag
Method Detail
decorate()method
override public function decorate(builder:ObjectDefinitionBuilder):void

Method to be invoked by the container for each configuration tag it encounters for an object that was added to the container. It doesn't matter whether it is a builtin configuration tag or a custom extension tag, or whether it is a metadata tag, an MXML or XML tag. As long as the tag is mapped to a class that implements this interface the container will invoke it for each tag on each object.

The builder parameter getting passed to the decorator can be used to customize the ObjectDefinition that is currently getting processed. In most custom tag implementations you will peform tasks like specifying constructor arguments, property values, message receivers, custom lifecycle processors or instantiators.

A decorator is also allowed to register additional definitions through using builder.newBuilder. Those additional definitions might describe collaborators that the processed definition will need to operate for example. If you want to register collaborators that are globally accessible (or within a certain scope) you may consider adding them to the ScopeExtensionRegistry in the GlobalFactoryRegistry instead.

Parameters

builder:ObjectDefinitionBuilder — the builder that can be used to modify the target definition