Packageorg.spicefactory.lib.expr.impl
Classpublic class ChainedPropertyResolver
InheritanceChainedPropertyResolver Inheritance Object
Implements PropertyResolver

PropertyResolver implementation that chains multiple PropertyResolver. For resolving properties this implementation will delegate the task to each of the chained PropertyResolver instances until one of them is able to resolve the property. The order of execution corresponds to the order in which PropertyResolver instances were added.



Public Methods
 MethodDefined By
  
Creates a new instance.
ChainedPropertyResolver
  
Adds the specified VariableResolver instance to the internal chain.
ChainedPropertyResolver
  
resolveProperty(baseObject:Object, propertyName:String):*
Resolves the property with the specified name in the given base object.
ChainedPropertyResolver
Constructor Detail
ChainedPropertyResolver()Constructor
public function ChainedPropertyResolver()

Creates a new instance.

Method Detail
addResolver()method
public function addResolver(resolver:PropertyResolver):void

Adds the specified VariableResolver instance to the internal chain.

Parameters

resolver:PropertyResolver — the resolver to add to the internal chain.

resolveProperty()method 
public function resolveProperty(baseObject:Object, propertyName:String):*

Resolves the property with the specified name in the given base object. The term "property" may be loosely interpreted and does not necessarily have to refer to a real property in the base object. If the property cannot be resolved this method should return undefined.

Parameters

baseObject:Object — the object to extract the property from
 
propertyName:String — the name of the property to resolve

Returns
* — the resolved property value or undefined if the variable cannot be resolved