| Package | org.springextensions.actionscript.ioc.factory.config |
| SVN browsing | RequiredMetadataObjectPostProcessor.as |
| Fisheye | RequiredMetadataObjectPostProcessor.as |
| Class | public class RequiredMetadataObjectPostProcessor |
| Inheritance | RequiredMetadataObjectPostProcessor AbstractMetadataProcessor |
| Implements | IObjectFactoryAware |
IMetadataProcessor implementation that enforces required properties to have been configured. A
property is marked as required by adding [Required] metadata to the property definition:
[Required] public var myProperty:Type;
<object class="org.springextensions.actionscript.ioc.factory.config.RequiredMetadataObjectPostProcessor" />
Author: Christophe Herreman
Version: $Revision: 21 $, $Date: 2008-11-01 22:58:42 +0100 (za, 01 nov 2008) $, $Author: dmurat $
Since: 0.1
Documentation reference: enforcing required property injections
| Property | Defined by | ||
|---|---|---|---|
![]() | metadataNames : Array
The names of the metadata annotations that the current
IMetadataProcessor processes. | AbstractMetadataProcessor | |
| objectFactory : IObjectFactory
[write-only]
| RequiredMetadataObjectPostProcessor | ||
![]() | processBeforeInitialization : Boolean
If
true the IMetadataProcessor instance will be able to process the annotated
instance before it has been initialized by the container. | AbstractMetadataProcessor | |
| Method | Defined by | ||
|---|---|---|---|
|
Constructs
RequiredMetadataObjectPostProcessor
| RequiredMetadataObjectPostProcessor | ||
|
postProcessAfterInitialization(object:*, objectName:String):*
This method has not been implemented
| RequiredMetadataObjectPostProcessor | ||
|
process(instance:Object, container:IMetaDataContainer, name:String, objectName:String):void
Will check the metadata of the given object to see if any property contains [Required] metadata.
| RequiredMetadataObjectPostProcessor | ||
| objectFactory | property |
objectFactory:IObjectFactory [write-only]Implementation
public function set objectFactory(value:IObjectFactory):void
| RequiredMetadataObjectPostProcessor | () | constructor |
public function RequiredMetadataObjectPostProcessor()
Constructs RequiredMetadataObjectPostProcessor
| postProcessAfterInitialization | () | method |
public function postProcessAfterInitialization(object:*, objectName:String):*This method has not been implemented
Parametersobject:* |
|
objectName:String |
* |
| process | () | method |
public override function process(instance:Object, container:IMetaDataContainer, name:String, objectName:String):voidWill check the metadata of the given object to see if any property contains [Required] metadata. If it has this type of metadata and is not available in the object definition an error will be thrown. Throws an error when invoked directly, needs to be overriden by a subclass.
Parametersinstance:Object — The object that has been instantiated
|
|
container:IMetaDataContainer — The name of the object
|
|
name:String |
|
objectName:String |
— If the property was required but not defined.
|