gnu.mapping
public abstract class MethodProc extends ProcedureN
| Field Summary | |
|---|---|
| protected Object | argTypes The parameter types.
|
| static int | NO_MATCH Return code from match: Unspecified failure. |
| static int | NO_MATCH_AMBIGUOUS Return code from match: Ambigious which method to select. |
| static int | NO_MATCH_BAD_TYPE Return code from match: Invalid argument type.
|
| static int | NO_MATCH_TOO_FEW_ARGS Return code from match: Too few actual arguments.
|
| static int | NO_MATCH_TOO_MANY_ARGS Return code from match: Too many actual arguments.
|
| Method Summary | |
|---|---|
| Object | applyN(Object[] args) |
| Type | getParameterType(int index) |
| int | isApplicable(Type[] argTypes) Test if method is applicable to an invocation with given arguments.
|
| static RuntimeException | matchFailAsException(int code, Procedure proc, Object[] args) Helper method to throw an exception if a matchX
method fails. |
| static MethodProc | mostSpecific(MethodProc proc1, MethodProc proc2) Return the more specific of the arguments. |
| static int | mostSpecific(MethodProc[] procs, int length) Return the index of the most specific method. |
| int | numParameters() Return number of parameters, including optional and rest arguments. |
| protected void | resolveParameterTypes() Figure out or decode the parameter types, setting argTypes. |
matchX
method fails.Returns: null if neither is more specific.