Packageorg.spicefactory.lib.expr.impl
Classpublic class DefaultVariableResolver
InheritanceDefaultVariableResolver Inheritance Object
Implements VariableResolver

The default VariableResolver implementation mapping variable names to values with an internal Dictionary. Values for all variables must be explicitly set with this VariableResolver.



Public Methods
 MethodDefined By
  
Creates a new instance.
DefaultVariableResolver
  
removeVariable(name:String):void
Removes the variable with the specified name from this resolver.
DefaultVariableResolver
  
resolveVariable(variableName:String):*
Resolves the variable with the specified name.
DefaultVariableResolver
  
setVariable(name:String, value:*):void
Sets the variable with the specified name to a new value.
DefaultVariableResolver
Constructor Detail
DefaultVariableResolver()Constructor
public function DefaultVariableResolver()

Creates a new instance.

Method Detail
removeVariable()method
public function removeVariable(name:String):void

Removes the variable with the specified name from this resolver.

Parameters

name:String — the name of the variable to remove

resolveVariable()method 
public function resolveVariable(variableName:String):*

Resolves the variable with the specified name. If the variable cannot be resolved this method should return undefined.

Parameters

variableName:String — the name of the variable to resolve

Returns
* — the value associated with the specified variable name or undefined if the variable cannot be resolved
setVariable()method 
public function setVariable(name:String, value:*):void

Sets the variable with the specified name to a new value.

Parameters

name:String — the name of the variable
 
value:* — the new value of the variable