Packageorg.springextensions.actionscript.ioc.factory.config
Classpublic class RequiredMetadataObjectPostProcessor
ImplementsIObjectFactoryAware, IObjectPostProcessor

ObjectPostProcessor 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;
   

In order to add this post processor to you configuration add the following line to the xml:

<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



Public Properties
 PropertyDefined by
  objectFactory : IObjectFactory
[write-only]
RequiredMetadataObjectPostProcessor
Public Methods
 MethodDefined by
  
Constructs RequiredMetadataObjectPostProcessor
RequiredMetadataObjectPostProcessor
  
postProcessAfterInitialization(object:*, objectName:String):*
This method has not been implemented
RequiredMetadataObjectPostProcessor
  
postProcessBeforeInitialization(object:*, objectName:String):*
Will check the metadata of the given object to see if any property contains [Required] metadata.
RequiredMetadataObjectPostProcessor
Property detail
objectFactoryproperty
objectFactory:IObjectFactory  [write-only]

Implementation
    public function set objectFactory(value:IObjectFactory):void
Constructor detail
RequiredMetadataObjectPostProcessor()constructor
public function RequiredMetadataObjectPostProcessor()

Constructs RequiredMetadataObjectPostProcessor

Method detail
postProcessAfterInitialization()method
public function postProcessAfterInitialization(object:*, objectName:String):*

This method has not been implemented

Parameters
object:*
 
objectName:String

Returns
*
postProcessBeforeInitialization()method 
public function postProcessBeforeInitialization(object:*, objectName:String):*

Will 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.

Parameters
object:* — The object that has been instantiated
 
objectName:String — The name of the object

Returns
*

Throws
IllegalArgumentError — If the property was required but not defined.