gnu.mapping
public abstract class Procedure extends PropertySet
| Constructor Summary | |
|---|---|
| Procedure() | |
| Procedure(String n) | |
| Method Summary | |
|---|---|
| void | apply(CallContext ctx) Call this Procedure using the explicit-CallContext-convention.
|
| static void | apply(Procedure proc, CallContext ctx) |
| abstract Object | apply0() |
| abstract Object | apply1(Object arg1) |
| abstract Object | apply2(Object arg1, Object arg2) |
| abstract Object | apply3(Object arg1, Object arg2, Object arg3) |
| abstract Object | apply4(Object arg1, Object arg2, Object arg3, Object arg4) |
| abstract Object | applyN(Object[] args) |
| void | check0(CallContext ctx) Does match0, plus throws exception on argument mismatch. |
| void | check1(Object arg1, CallContext ctx) Does match1, plus throws exception on argument mismatch. |
| void | check2(Object arg1, Object arg2, CallContext ctx) Does match, plus throws exception on argument mismatch. |
| void | check3(Object arg1, Object arg2, Object arg3, CallContext ctx) Does match3, plus throws exception on argument mismatch. |
| void | check4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx) Does match4, plus throws exception on argument mismatch. |
| static void | checkArgCount(Procedure proc, int argCount) Check that the number of arguments in a call is valid. |
| void | checkN(Object[] args, CallContext ctx) Does matchN, plus throws exception on argument mismatch. |
| Procedure | getSetter() |
| String | getSourceLocation() |
| int | match0(CallContext ctx) Pass zero arguments. |
| int | match1(Object arg1, CallContext ctx) Pass one argument. |
| int | match2(Object arg1, Object arg2, CallContext ctx) Pass two arguments. |
| int | match3(Object arg1, Object arg2, Object arg3, CallContext ctx) Pass three arguments. |
| int | match4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx) Pass four arguments. |
| int | matchN(Object[] args, CallContext ctx) |
| int | maxArgs() Maximum number of arguments allowed, or -1 for unlimited.
|
| int | minArgs() Minimum number of arguments required. |
| int | numArgs() Return minArgs()|(maxArgs<<12). |
| void | set0(Object result) If HasSetter, the Procedure is called in the LHS of an assignment. |
| void | set1(Object arg1, Object value) |
| void | setN(Object[] args) |
| void | setSetter(Procedure setter) |
| void | setSourceLocation(String file, int line) |
| String | toString() |
Parameters: proc the Procedure being called argCount the number of arguments in the call
Throws: WrongArguments there are too many or too few actual arguments
Returns: non-negative if the match succeeded, else negative.
Returns: non-negative if the match succeeded, else negative.
Returns: non-negative if the match succeeded, else negative.
Returns: non-negative if the match succeeded, else negative.
Returns: non-negative if the match succeeded, else negative.