A collection of MethodProcs; one is chosen at apply time.
applyN
public Object applyN(Object[] args)
throws Throwable
- applyN in interface MethodProc
isApplicable
public int isApplicable(Type[] args)
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.
- isApplicable in interface MethodProc
make
public static GenericProc make(Object[] args)
Create a GenericProc from one or more methods, plus properties.
match0
public int match0(CallContext ctx)
Pass zero arguments.
- match0 in interface Procedure
- non-negative if the match succeeded, else negative.
match1
public int match1(Object arg1,
CallContext ctx)
Pass one argument.
- match1 in interface Procedure
- non-negative if the match succeeded, else negative.
match2
public int match2(Object arg1,
Object arg2,
CallContext ctx)
Pass two arguments.
- match2 in interface Procedure
- non-negative if the match succeeded, else negative.
match3
public int match3(Object arg1,
Object arg2,
Object arg3,
CallContext ctx)
Pass three arguments.
- match3 in interface Procedure
- non-negative if the match succeeded, else negative.
match4
public int match4(Object arg1,
Object arg2,
Object arg3,
Object arg4,
CallContext ctx)
Pass four arguments.
- match4 in interface Procedure
- non-negative if the match succeeded, else negative.
numArgs
public int numArgs()
Return minArgs()|(maxArgs<<12).
- numArgs in interface Procedure
setProperties
public final void setProperties(Object[] args)