Packageorg.spicefactory.lib.xml.mapper.metadata
Classpublic class ChoiceTypeDecorator
InheritanceChoiceTypeDecorator Inheritance Object
Implements MetadataMapperDecorator

Represents a Metadata tag that can be used on properties that should map to a choice of child elements that map to a particular interface or class and its subtypes and implementors. The tag can be used on Array properties, too. In this case multiple child elements are allowed in the mapped XML.



Public Properties
 PropertyDefined By
  property : String
The name of the property.
ChoiceTypeDecorator
  type : Class
The type that valid child elements map to.
ChoiceTypeDecorator
Public Methods
 MethodDefined By
  
Method to be invoked by the framework for each occurence of a metadata tag on each mapped class.
ChoiceTypeDecorator
Property Detail
propertyproperty
public var property:String

The name of the property.

typeproperty 
public var type:Class

The type that valid child elements map to. This is interpreted polymorphically.

Method Detail
decorate()method
public function decorate(builder:MetadataMapperBuilder):void

Method to be invoked by the framework for each occurence of a metadata tag on each mapped class. It allows to validate and process the attributes of that tag and to modifiy the specified mapper builder accordingly. All existing builtin metadata tags like [Attribute] or [ChoiceId] implement this interface, too.

Parameters

builder:MetadataMapperBuilder — the builder that can be modified for the mapping of the property the metadata tag was placed upon