| java.lang.Object gnu.mapping.PropertySet gnu.mapping.Procedure
All known Subclasses: gnu.mapping.Procedure2, kawa.lang.AutoloadProcedure, gnu.mapping.Procedure0, gnu.mapping.ProcedureN, gnu.mapping.Procedure4, gnu.mapping.Procedure0or1, gnu.mapping.Procedure3, gnu.mapping.Procedure1, gnu.mapping.Procedure1or2,
Procedure | abstract public class Procedure extends PropertySet (Code) | | The abstract parent for all Scheme functions.
author: Per Bothner |
Method Summary | |
public void | apply(CallContext ctx) Call this Procedure using the explicit-CallContext-convention.
The input arguments are (by default) in stack.args;
the result is written to ctx.consumer. | public static void | apply(Procedure proc, CallContext ctx) | abstract public Object | apply0() | abstract public Object | apply1(Object arg1) | abstract public Object | apply2(Object arg1, Object arg2) | abstract public Object | apply3(Object arg1, Object arg2, Object arg3) | abstract public Object | apply4(Object arg1, Object arg2, Object arg3, Object arg4) | abstract public Object | applyN(Object[] args) | public void | check0(CallContext ctx) Does match0, plus throws exception on argument mismatch. | public void | check1(Object arg1, CallContext ctx) Does match1, plus throws exception on argument mismatch. | public void | check2(Object arg1, Object arg2, CallContext ctx) Does match, plus throws exception on argument mismatch. | public void | check3(Object arg1, Object arg2, Object arg3, CallContext ctx) Does match3, plus throws exception on argument mismatch. | public void | check4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx) Does match4, plus throws exception on argument mismatch. | public static void | checkArgCount(Procedure proc, int argCount) Check that the number of arguments in a call is valid. | public void | checkN(Object[] args, CallContext ctx) Does matchN, plus throws exception on argument mismatch. | public Procedure | getSetter() | public String | getSourceLocation() | public int | match0(CallContext ctx) Pass zero arguments. | public int | match1(Object arg1, CallContext ctx) Pass one argument. | public int | match2(Object arg1, Object arg2, CallContext ctx) Pass two arguments. | public int | match3(Object arg1, Object arg2, Object arg3, CallContext ctx) Pass three arguments. | public int | match4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx) Pass four arguments. | public int | matchN(Object[] args, CallContext ctx) | final public int | maxArgs() Maximum number of arguments allowed, or -1 for unlimited. | final public int | minArgs() Minimum number of arguments required. | public int | numArgs() Return minArgs()|(maxArgs<<12). | public void | set0(Object result) If HasSetter, the Procedure is called in the LHS of an assignment. | public void | set1(Object arg1, Object value) | public void | setN(Object[] args) | public void | setSetter(Procedure setter) | public void | setSourceLocation(String file, int line) | public String | toString() |
Procedure | public Procedure()(Code) | | |
apply | public void apply(CallContext ctx) throws Throwable(Code) | | Call this Procedure using the explicit-CallContext-convention.
The input arguments are (by default) in stack.args;
the result is written to ctx.consumer.
|
check0 | public void check0(CallContext ctx)(Code) | | Does match0, plus throws exception on argument mismatch.
|
check1 | public void check1(Object arg1, CallContext ctx)(Code) | | Does match1, plus throws exception on argument mismatch.
|
checkArgCount | public static void checkArgCount(Procedure proc, int argCount)(Code) | | Check that the number of arguments in a call is valid.
Parameters: proc - the Procedure being called Parameters: argCount - the number of arguments in the call exception: WrongArguments - there are too many or toofew actual arguments |
checkN | public void checkN(Object[] args, CallContext ctx)(Code) | | Does matchN, plus throws exception on argument mismatch.
|
match0 | public int match0(CallContext ctx)(Code) | | Pass zero arguments.
non-negative if the match succeeded, else negative. |
match1 | public int match1(Object arg1, CallContext ctx)(Code) | | Pass one argument.
non-negative if the match succeeded, else negative. |
maxArgs | final public int maxArgs()(Code) | | Maximum number of arguments allowed, or -1 for unlimited.
(May also return -1 if there are keyword arguments, for implementation
reasons.)
|
minArgs | final public int minArgs()(Code) | | Minimum number of arguments required.
|
numArgs | public int numArgs()(Code) | | Return minArgs()|(maxArgs<<12).
|
set0 | public void set0(Object result) throws Throwable(Code) | | If HasSetter, the Procedure is called in the LHS of an assignment.
|
setSourceLocation | public void setSourceLocation(String file, int line)(Code) | | |
|
|