|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--net.sf.arise.piji.AbstractFunction
| Constructor Summary | |
protected |
AbstractFunction(java.lang.String docString,
boolean vararg,
int argCount,
Context context)
|
protected |
AbstractFunction(java.lang.String docString,
int argCount,
Context context)
|
| Method Summary | |
abstract java.lang.Object |
apply(Context context,
Expression[] nodes)
Applies the function to a set of values in a given context and returns the result |
protected void |
checkArgumentCount(Expression[] args)
|
protected LeafNode |
checkLeaf(Expression expr)
|
protected LeafNode |
checkLeaf(Expression expr,
java.lang.String msg)
|
protected ListNode |
checkList(Expression expr)
|
protected ListNode |
checkList(Expression expr,
java.lang.String msg)
|
protected java.lang.String |
checkString(Expression expr)
|
protected java.lang.String |
checkString(Expression expr,
java.lang.String msg)
|
protected Symbol |
checkSymbol(Expression expr)
|
protected Symbol |
checkSymbol(Expression expr,
boolean fail)
|
protected Symbol |
checkSymbol(Expression expr,
java.lang.String msg)
|
protected Symbol |
checkSymbol(Expression expr,
java.lang.String msg,
boolean fail)
|
protected void |
fillContext(Context ctx,
Context letCtx,
ListNode list,
boolean prog)
|
protected void |
fillContext(Context ctx,
ListNode list)
|
int |
getArgumentCount()
Gets the minimum number of required arguments |
Context |
getContext()
Gets the definition context |
java.lang.String |
getDocumentationString()
Returns a documentation string |
protected static boolean |
isLeaf(Expression expr)
|
protected static boolean |
isList(Expression expr)
|
protected static boolean |
isString(Expression expr)
|
protected static boolean |
isSymbol(Expression expr)
|
boolean |
isVararg()
Returns true iff this function is vararg, ie. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected AbstractFunction(java.lang.String docString,
int argCount,
Context context)
protected AbstractFunction(java.lang.String docString,
boolean vararg,
int argCount,
Context context)
| Method Detail |
public boolean isVararg()
Function
isVararg in interface Functionpublic java.lang.String getDocumentationString()
Function
getDocumentationString in interface Functionpublic int getArgumentCount()
Function
getArgumentCount in interface Functionpublic Context getContext()
Function
getContext in interface Function
protected final void checkArgumentCount(Expression[] args)
throws WrongArgumentCountException
WrongArgumentCountExceptionprotected static final boolean isList(Expression expr)
protected static final boolean isLeaf(Expression expr)
protected static final boolean isSymbol(Expression expr)
protected static final boolean isString(Expression expr)
public abstract java.lang.Object apply(Context context,
Expression[] nodes)
throws java.lang.Throwable
Function
apply in interface Functioncontext - The context to apply this function in
java.lang.Throwable
protected final LeafNode checkLeaf(Expression expr)
throws BadArgumentException
BadArgumentException
protected final LeafNode checkLeaf(Expression expr,
java.lang.String msg)
throws BadArgumentException
BadArgumentException
protected final java.lang.String checkString(Expression expr)
throws BadArgumentException
BadArgumentException
protected final java.lang.String checkString(Expression expr,
java.lang.String msg)
throws BadArgumentException
BadArgumentException
protected final Symbol checkSymbol(Expression expr)
throws BadArgumentException
BadArgumentException
protected final Symbol checkSymbol(Expression expr,
boolean fail)
throws BadArgumentException
BadArgumentException
protected final Symbol checkSymbol(Expression expr,
java.lang.String msg)
throws BadArgumentException
BadArgumentException
protected final Symbol checkSymbol(Expression expr,
java.lang.String msg,
boolean fail)
throws BadArgumentException
BadArgumentException
protected final ListNode checkList(Expression expr)
throws BadArgumentException
BadArgumentException
protected final ListNode checkList(Expression expr,
java.lang.String msg)
throws BadArgumentException
BadArgumentException
protected final void fillContext(Context ctx,
ListNode list)
throws java.lang.Throwable
java.lang.Throwable
protected final void fillContext(Context ctx,
Context letCtx,
ListNode list,
boolean prog)
throws java.lang.Throwable
java.lang.Throwable
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
All code and documentation is
Copyright (c) : 2000-2003 Kjetil Valstadsve & Maja S. Bratseth