Central registry for all available command adapters.
An adapter must be registered before executing or configuring one of the commands
handled by the adapter.
public static function addFactory(factory:CommandAdapterFactory, order:int = 2147483647):void
Adds a factory to this registry. The order attributes allows to sort all available
factories. For each new command instance that does not implement one of the command
interfaces the factories get asked to create a new adapter in the specified order
until one factory was able to handle the command (Chain of Responsibility).
factory:CommandAdapterFactory — factory to add to this registry.
order:int (default =
— the order to use for this factory
public static function createAdapter(instance:Object, domain:ApplicationDomain = null):CommandAdapter
Creates a new adapter for the specified target command.
Throws an error if the instance cannot be handled by any of the available adapters
instance:Object — the target command that usually does not implement one of the Command interfaces
domain:ApplicationDomain (default =
— the ApplicationDomain to use for reflection
Mon Feb 6 2012, 01:04 AM +01:00