| java.lang.Object gnu.mapping.PropertySet gnu.mapping.Procedure gnu.mapping.ProcedureN gnu.mapping.MethodProc
All known Subclasses: gnu.expr.PrimProcedure, gnu.kawa.xml.NodeConstructor, gnu.xquery.util.OrderedMap, gnu.xquery.util.ValuesEvery, gnu.kawa.xml.MakeCDATA, gnu.xquery.util.RelativeStep, gnu.q2.lang.Q2Apply, kawa.standard.callcc, gnu.xquery.util.ValuesFilter, gnu.expr.ModuleMethod, gnu.kawa.xml.Attributes, gnu.xquery.util.IntegerRange, gnu.kawa.servlet.GetRequest, gnu.kawa.xml.ListItems, gnu.expr.GenericProc, gnu.kawa.xml.IteratorItems, gnu.kawa.functions.ValuesMap, gnu.kawa.functions.AppendValues, kawa.lang.Continuation, gnu.kawa.xml.CommentConstructor, gnu.xquery.util.SubList, gnu.kawa.xml.TreeScanner, gnu.kawa.xml.Children, gnu.kawa.xml.MakeResponseHeader, gnu.kawa.servlet.GetResponse, gnu.kawa.reflect.TypeSwitch,
MethodProc | abstract public class MethodProc extends ProcedureN (Code) | | Similar to a CLOS method.
Can check if arguments "match" before committing to calling method.
|
Field Summary | |
final public static int | NO_MATCH Return code from match: Unspecified failure. | final public static int | NO_MATCH_AMBIGUOUS Return code from match: Ambigious which method to select. | final public static int | NO_MATCH_BAD_TYPE Return code from match: Invalid argument type.
In that case the lower half is the 1-origin index of the first
argument that does not match. | final public static int | NO_MATCH_TOO_FEW_ARGS Return code from match: Too few actual arguments.
The lower half is the minimum number of arguments (if not 0xffff). | final public static int | NO_MATCH_TOO_MANY_ARGS Return code from match: Too many actual arguments.
The lower half is the maximum number of arguments (if not 0xffff). | protected Object | argTypes The parameter types.
Usually either an Type[] or a String encoding. | final static Type[] | unknownArgTypes |
NO_MATCH | final public static int NO_MATCH(Code) | | Return code from match: Unspecified failure.
|
NO_MATCH_AMBIGUOUS | final public static int NO_MATCH_AMBIGUOUS(Code) | | Return code from match: Ambigious which method to select.
|
NO_MATCH_BAD_TYPE | final public static int NO_MATCH_BAD_TYPE(Code) | | Return code from match: Invalid argument type.
In that case the lower half is the 1-origin index of the first
argument that does not match.
|
NO_MATCH_TOO_FEW_ARGS | final public static int NO_MATCH_TOO_FEW_ARGS(Code) | | Return code from match: Too few actual arguments.
The lower half is the minimum number of arguments (if not 0xffff).
|
NO_MATCH_TOO_MANY_ARGS | final public static int NO_MATCH_TOO_MANY_ARGS(Code) | | Return code from match: Too many actual arguments.
The lower half is the maximum number of arguments (if not 0xffff).
|
argTypes | protected Object argTypes(Code) | | The parameter types.
Usually either an Type[] or a String encoding.
|
unknownArgTypes | final static Type[] unknownArgTypes(Code) | | |
getParameterType | public Type getParameterType(int index)(Code) | | |
isApplicable | public int isApplicable(Type[] argTypes)(Code) | | Test if method is applicable to an invocation with given arguments.
Returns -1 if no; 1 if yes; 0 if need to check at run-time.
|
mostSpecific | public static int mostSpecific(MethodProc[] procs, int length)(Code) | | Return the index of the most specific method.
|
numParameters | public int numParameters()(Code) | | Return number of parameters, including optional and rest arguments.
|
resolveParameterTypes | protected void resolveParameterTypes()(Code) | | Figure out or decode the parameter types, setting argTypes.
|
Methods inherited from gnu.mapping.Procedure | public void apply(CallContext ctx) throws Throwable(Code)(Java Doc) public static void apply(Procedure proc, CallContext ctx) throws Throwable(Code)(Java Doc) abstract public Object apply0() throws Throwable(Code)(Java Doc) abstract public Object apply1(Object arg1) throws Throwable(Code)(Java Doc) abstract public Object apply2(Object arg1, Object arg2) throws Throwable(Code)(Java Doc) abstract public Object apply3(Object arg1, Object arg2, Object arg3) throws Throwable(Code)(Java Doc) abstract public Object apply4(Object arg1, Object arg2, Object arg3, Object arg4) throws Throwable(Code)(Java Doc) abstract public Object applyN(Object[] args) throws Throwable(Code)(Java Doc) public void check0(CallContext ctx)(Code)(Java Doc) public void check1(Object arg1, CallContext ctx)(Code)(Java Doc) public void check2(Object arg1, Object arg2, CallContext ctx)(Code)(Java Doc) public void check3(Object arg1, Object arg2, Object arg3, CallContext ctx)(Code)(Java Doc) public void check4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx)(Code)(Java Doc) public static void checkArgCount(Procedure proc, int argCount)(Code)(Java Doc) public void checkN(Object[] args, CallContext ctx)(Code)(Java Doc) public Procedure getSetter()(Code)(Java Doc) public String getSourceLocation()(Code)(Java Doc) public int match0(CallContext ctx)(Code)(Java Doc) public int match1(Object arg1, CallContext ctx)(Code)(Java Doc) public int match2(Object arg1, Object arg2, CallContext ctx)(Code)(Java Doc) public int match3(Object arg1, Object arg2, Object arg3, CallContext ctx)(Code)(Java Doc) public int match4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx)(Code)(Java Doc) public int matchN(Object[] args, CallContext ctx)(Code)(Java Doc) final public int maxArgs()(Code)(Java Doc) final public int minArgs()(Code)(Java Doc) public int numArgs()(Code)(Java Doc) public void set0(Object result) throws Throwable(Code)(Java Doc) public void set1(Object arg1, Object value) throws Throwable(Code)(Java Doc) public void setN(Object[] args) throws Throwable(Code)(Java Doc) public void setSetter(Procedure setter)(Code)(Java Doc) public void setSourceLocation(String file, int line)(Code)(Java Doc) public String toString()(Code)(Java Doc)
|
|
|