| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectgnu.mapping.Procedure
gnu.mapping.ProcedureN
gnu.mapping.MethodProc
gnu.expr.GenericProc
public class GenericProc
A collection of MethodProcs; one is chosen at apply time.
| Field Summary | |
|---|---|
| protected  MethodProc[] | methods | 
| Fields inherited from class gnu.mapping.MethodProc | 
|---|
| argTypes, NO_MATCH, NO_MATCH_AMBIGUOUS, NO_MATCH_BAD_TYPE, NO_MATCH_TOO_FEW_ARGS, NO_MATCH_TOO_MANY_ARGS | 
| Fields inherited from class gnu.mapping.ProcedureN | 
|---|
| noArgs | 
| Constructor Summary | |
|---|---|
| GenericProc() | |
| GenericProc(java.lang.String name) | |
| Method Summary | |
|---|---|
|  void | add(MethodProc method) | 
| protected  void | add(MethodProc[] procs) | 
|  java.lang.Object | applyN(java.lang.Object[] args) | 
|  int | isApplicable(Type[] args)Test if method is applicable to an invocation with given arguments. | 
| static GenericProc | make(java.lang.Object[] args)Create a GenericProc from one or more methods, plus properties. | 
|  int | match0(CallContext ctx)Pass zero arguments. | 
|  int | match1(java.lang.Object arg1,
       CallContext ctx)Pass one argument. | 
|  int | match2(java.lang.Object arg1,
       java.lang.Object arg2,
       CallContext ctx)Pass two arguments. | 
|  int | match3(java.lang.Object arg1,
       java.lang.Object arg2,
       java.lang.Object arg3,
       CallContext ctx)Pass three arguments. | 
|  int | match4(java.lang.Object arg1,
       java.lang.Object arg2,
       java.lang.Object arg3,
       java.lang.Object arg4,
       CallContext ctx)Pass four arguments. | 
|  int | matchN(java.lang.Object[] args,
       CallContext ctx) | 
|  int | numArgs()Return minArgs()|(maxArgs<<12). | 
|  void | setProperties(java.lang.Object[] args) | 
| Methods inherited from class gnu.mapping.MethodProc | 
|---|
| getParameterType, matchFailAsException, mostSpecific, mostSpecific, numParameters, resolveParameterTypes | 
| Methods inherited from class gnu.mapping.ProcedureN | 
|---|
| apply0, apply1, apply2, apply3, apply4 | 
| Methods inherited from class gnu.mapping.Procedure | 
|---|
| apply, apply, check0, check1, check2, check3, check4, checkArgCount, checkN, getName, getProperty, getSetter, getSymbol, maxArgs, minArgs, name, removeProperty, set0, set1, setN, setName, setProperty, setProperty, setSetter, setSymbol, toString | 
| Methods inherited from class java.lang.Object | 
|---|
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait | 
| Field Detail | 
|---|
protected MethodProc[] methods
| Constructor Detail | 
|---|
public GenericProc(java.lang.String name)
public GenericProc()
| Method Detail | 
|---|
public int numArgs()
Procedure
numArgs in class Procedureprotected void add(MethodProc[] procs)
public void add(MethodProc method)
public java.lang.Object applyN(java.lang.Object[] args)
                        throws java.lang.Throwable
applyN in class MethodProcjava.lang.Throwablepublic int isApplicable(Type[] args)
MethodProc
isApplicable in class MethodProcpublic int match0(CallContext ctx)
Procedure
match0 in class Procedure
public int match1(java.lang.Object arg1,
                  CallContext ctx)
Procedure
match1 in class Procedure
public int match2(java.lang.Object arg1,
                  java.lang.Object arg2,
                  CallContext ctx)
Procedure
match2 in class Procedure
public int match3(java.lang.Object arg1,
                  java.lang.Object arg2,
                  java.lang.Object arg3,
                  CallContext ctx)
Procedure
match3 in class Procedure
public int match4(java.lang.Object arg1,
                  java.lang.Object arg2,
                  java.lang.Object arg3,
                  java.lang.Object arg4,
                  CallContext ctx)
Procedure
match4 in class Procedure
public int matchN(java.lang.Object[] args,
                  CallContext ctx)
matchN in class Procedurepublic final void setProperties(java.lang.Object[] args)
public static GenericProc make(java.lang.Object[] args)
| 
 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||