|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.cscott.sdr.calls.ExprFunc<Evaluator> net.cscott.sdr.calls.Call net.cscott.sdr.calls.transform.Finish.PartSelectorCall
public abstract static class Finish.PartSelectorCall
Helper class to define concepts based on this class (and subclasses of it).
Nested Class Summary |
---|
Nested classes/interfaces inherited from class net.cscott.sdr.calls.ExprFunc |
---|
ExprFunc.EvaluationException |
Constructor Summary | |
---|---|
Finish.PartSelectorCall(String name,
Program program,
String rule)
|
Method Summary | |
---|---|
List<Expr> |
getDefaultArguments()
Return argument defaults, if there are any for this call. |
Evaluator |
getEvaluator(DanceState ds,
List<Expr> args)
Returns the Evaluator to use on the result of an application. |
int |
getMinNumberOfArguments()
Return the number of arguments which should, at minimum, be given to this Call . |
String |
getName()
The name of this call, in our internal jargon. |
protected abstract Finish |
getPartsVisitor(DanceState ds)
|
Program |
getProgram()
The program to which this particular call or concept belongs. |
Rule |
getRule()
Returns the grammar rule applicable to this call, or null , if there is none (ie, this is an internal call). |
Methods inherited from class net.cscott.sdr.calls.Call |
---|
equals, evaluate, hashCode, makeSimpleCall, toString |
Methods inherited from class net.cscott.sdr.calls.ExprFunc |
---|
isConstant |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public Finish.PartSelectorCall(String name, Program program, String rule)
Method Detail |
---|
public final String getName()
Call
getName
in class Call
public final Program getProgram()
Call
getProgram
in class Call
public Rule getRule()
Call
null
, if there is none (ie, this is an internal call).
getRule
in class Call
public List<Expr> getDefaultArguments()
Call
null
, have no default.
getDefaultArguments
in class Call
public int getMinNumberOfArguments()
Call
Call
. Usually this is the exact number of arguments required,
but some combining calls (like 'and') can take an arbitrary number of
arguments.
getMinNumberOfArguments
in class Call
public Evaluator getEvaluator(DanceState ds, List<Expr> args) throws ExprFunc.EvaluationException
Call
Evaluator
to use on the result of an application.
The Evaluator.hasSimpleExpansion()
method of the
Evaluator
will return true if this call can be simply expanded;
use the Evaluator.simpleExpansion()
method to obtain the
expansion. Otherwise the call
should be considered 'opaque' and requires use of the custom
Evaluator
.)
getEvaluator
in class Call
args
- identical to the args argument of
ExprFunc.evaluate(Class, DanceState, List)
.
ExprFunc.EvaluationException
protected abstract Finish getPartsVisitor(DanceState ds)
|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |