com.waveset.object
Class Rule.RuleResolver
java.lang.Object
com.waveset.object.Rule.RuleResolver
- All Implemented Interfaces:
- ExResolver
- Enclosing class:
- Rule
- public class Rule.RuleResolver
- extends java.lang.Object
- implements ExResolver
An ExResolver implementation we install in the ExState to
handle references to rule arguments.
// Has to be in a seperate class so we can manage arguments
// specified at runtime.
Fields inherited from interface com.waveset.expression.ExResolver |
PASS |
Method Summary |
void |
buildVariables(com.sun.idm.debugger.common.Variables variables)
|
java.util.Map |
getRuleArguments()
Called when the passThrough option is used in a
expression. |
java.lang.Object |
resolveCall(ExState state,
java.lang.String name,
java.util.List arglist)
Won't be here unless we're using an unsubclassed ExState. |
java.lang.Object |
resolveReference(ExState state,
java.lang.String name)
|
java.lang.Object |
resolveRule(ExState state,
java.lang.String name,
java.util.Map args)
Resolve a call to another rule. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Rule.RuleResolver
public Rule.RuleResolver(java.util.Map args)
resolveReference
public java.lang.Object resolveReference(ExState state,
java.lang.String name)
throws WavesetException
- Specified by:
resolveReference
in interface ExResolver
- Throws:
WavesetException
buildVariables
public void buildVariables(com.sun.idm.debugger.common.Variables variables)
- Specified by:
buildVariables
in interface ExResolver
resolveCall
public java.lang.Object resolveCall(ExState state,
java.lang.String name,
java.util.List arglist)
throws WavesetException
- Won't be here unless we're using an unsubclassed ExState.
Check for other rules if we have a cache.
Should now be using and ending up in resolveRule
instead.
NOTE: We won't have a cache if we're within a library.
be sure to return ExResolver.PASS so resolution passes
up to the next level. We really don't need to be resolving
rules here since you can't define "local" rules, can just
let the default resolver handle it.
Hmm, this could be the mechanism by which we allow inter-library
references without qualification?
- Specified by:
resolveCall
in interface ExResolver
- Throws:
WavesetException
resolveRule
public java.lang.Object resolveRule(ExState state,
java.lang.String name,
java.util.Map args)
throws WavesetException
- Resolve a call to another rule.
- Specified by:
resolveRule
in interface ExResolver
- Throws:
WavesetException
getRuleArguments
public java.util.Map getRuleArguments()
- Called when the passThrough option is used in a
expression. The application should supply a Map of
arguments that can be passed along to the rule, it is only
relevant for ExResolvers that are Rules.
- Specified by:
getRuleArguments
in interface ExResolver