intarsys runtime library

de.intarsys.tools.expression
Class ScopedResolver

java.lang.Object
  extended by de.intarsys.tools.expression.ScopedResolver
All Implemented Interfaces:
IStringEvaluator

public class ScopedResolver
extends Object
implements IStringEvaluator

An IStringEvaluator that supports a list of other resolvers that are each asked in turn for evaluating the result.


Constructor Summary
ScopedResolver()
           
 
Method Summary
 void addResolver(IStringEvaluator resolver)
          Add a new resolver at the end of the search sequence.
 Object evaluate(String expression, IArgs args)
          Evaluate an expression according to the syntax used by the implementor and return the result.
 IStringEvaluator popResolver()
           
 void pushResolver(IStringEvaluator resolver)
          Add a new resolver at the beginning of the search sequence.
 void removeResolver(IStringEvaluator resolver)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScopedResolver

public ScopedResolver()
Method Detail

addResolver

public void addResolver(IStringEvaluator resolver)
Add a new resolver at the end of the search sequence.

Parameters:
resolver -

evaluate

public Object evaluate(String expression,
                       IArgs args)
                throws EvaluationException
Description copied from interface: IStringEvaluator
Evaluate an expression according to the syntax used by the implementor and return the result.

Specified by:
evaluate in interface IStringEvaluator
Parameters:
expression - The expression to evaluate.
Returns:
The result object.
Throws:
EvaluationException - If we encounter a compile or runtime error.

popResolver

public IStringEvaluator popResolver()

pushResolver

public void pushResolver(IStringEvaluator resolver)
Add a new resolver at the beginning of the search sequence.

Parameters:
resolver -

removeResolver

public void removeResolver(IStringEvaluator resolver)

intarsys runtime library

Copyright © 2012 intarsys consulting GmbH. All Rights Reserved.