com.waveset.expression
Interface ExResolver

All Known Implementing Classes:
Rule.RuleResolver

public interface ExResolver

The interface of an object that may resolve references to variables, functions and rules. These may be given to an ExState to allow the insertion of resolution logic that wasn't part of the ExState subclass. Added for Rules, which are evaluated in the context of an ExState they didn't create, but which want to expose rule arguments as referenceable variables. With this, we could in most cases stop subclassing ExState and instead just making one and installing a resolver


Field Summary
static ExValue PASS
          An object constant that may be returned by any of the resolution methods to indicate that the resolver knows nothing about the requested object, and we should "pass" the request on to the next resolver on the stack.
 
Method Summary
 void buildVariables(com.sun.idm.debugger.common.Variables variables)
           
 java.util.Map getRuleArguments()
           
 java.lang.Object resolveCall(ExState state, java.lang.String name, java.util.List args)
           
 java.lang.Object resolveReference(ExState state, java.lang.String name)
           
 java.lang.Object resolveRule(ExState state, java.lang.String name, java.util.Map args)
           
 

Field Detail

PASS

public static final ExValue PASS
An object constant that may be returned by any of the resolution methods to indicate that the resolver knows nothing about the requested object, and we should "pass" the request on to the next resolver on the stack. A null Object reference cannot be used for this purpose since null is often a valid result.

Method Detail

resolveReference

public java.lang.Object resolveReference(ExState state,
                                         java.lang.String name)
                                  throws WavesetException
Throws:
WavesetException

resolveCall

public java.lang.Object resolveCall(ExState state,
                                    java.lang.String name,
                                    java.util.List args)
                             throws WavesetException
Throws:
WavesetException

resolveRule

public java.lang.Object resolveRule(ExState state,
                                    java.lang.String name,
                                    java.util.Map args)
                             throws WavesetException
Throws:
WavesetException

getRuleArguments

public java.util.Map getRuleArguments()

buildVariables

public void buildVariables(com.sun.idm.debugger.common.Variables variables)