|
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<T>
public abstract class ExprFunc<T>
An ExprFunc
is responsible for evaluating the value of an
Expr
. There are a list of
ExprFunc
s in ExprList
.
Nested Class Summary | |
---|---|
static class |
ExprFunc.EvaluationException
Thrown to indicate an unexpected problem evaluating an Expr , for example a type mismatch. |
Constructor Summary | |
---|---|
ExprFunc()
|
Method Summary | |
---|---|
abstract T |
evaluate(Class<? super T> type,
DanceState ds,
List<Expr> args)
Perform the operation of the ExprFunc on the given list of
arguments args , yielding a value of the specified type . |
abstract String |
getName()
The atom of Expr s which this ExprFunc should be used to
evaluate. |
boolean |
isConstant(Class<? super T> type,
List<Expr> args)
Indicates whether the result of the evaluation would be a constant (ie, independent of DanceState ). |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ExprFunc()
Method Detail |
---|
public abstract String getName()
Expr
s which this ExprFunc
should be used to
evaluate.
public abstract T evaluate(Class<? super T> type, DanceState ds, List<Expr> args) throws ExprFunc.EvaluationException
ExprFunc
on the given list of
arguments args
, yielding a value of the specified type
.
The DanceState
ds
is used as context for the
evaluation.
ExprFunc.EvaluationException
- on type mismatch or other unexpected
conditions.public boolean isConstant(Class<? super T> type, List<Expr> args)
DanceState
).
|
sdr 0.7 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |