gnu.expr

Class GenericProc

public class GenericProc extends MethodProc

A collection of MethodProcs; one is chosen at apply time.
Field Summary
protected MethodProc[]methods
Constructor Summary
GenericProc(String name)
GenericProc()
Method Summary
protected voidadd(MethodProc[] procs)
voidadd(MethodProc method)
ObjectapplyN(Object[] args)
intisApplicable(Type[] args)
static GenericProcmake(Object[] args)
Create a GenericProc from one or more methods, plus properties.
intmatch0(CallContext ctx)
intmatch1(Object arg1, CallContext ctx)
intmatch2(Object arg1, Object arg2, CallContext ctx)
intmatch3(Object arg1, Object arg2, Object arg3, CallContext ctx)
intmatch4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx)
intmatchN(Object[] args, CallContext ctx)
intnumArgs()
voidsetProperties(Object[] args)

Field Detail

methods

protected MethodProc[] methods

Constructor Detail

GenericProc

public GenericProc(String name)

GenericProc

public GenericProc()

Method Detail

add

protected void add(MethodProc[] procs)

add

public void add(MethodProc method)

applyN

public Object applyN(Object[] args)

isApplicable

public int isApplicable(Type[] args)

make

public static GenericProc make(Object[] args)
Create a GenericProc from one or more methods, plus properties.

match0

public int match0(CallContext ctx)

match1

public int match1(Object arg1, CallContext ctx)

match2

public int match2(Object arg1, Object arg2, CallContext ctx)

match3

public int match3(Object arg1, Object arg2, Object arg3, CallContext ctx)

match4

public int match4(Object arg1, Object arg2, Object arg3, Object arg4, CallContext ctx)

matchN

public int matchN(Object[] args, CallContext ctx)

numArgs

public int numArgs()

setProperties

public final void setProperties(Object[] args)