gnu.kawa.reflect
Class TypeSwitch
public
class
TypeSwitch
extends MethodProc
implements CanInline, Inlineable
Implement 'typeswitch' (as in XQuery) or 'typecase'.
Usage: (typeswitch SELECTOR CASE-LAMBDA ... DEFAULT-LAMBDA)
Each CASE-LAMBDA is a 1-argument MethodProc, while DEFAULT-LAMBDA
is a 0-argument Procedure. Calls the first CASE-LAMBDA such that
SELECTOR is a valid argument; if there is none, calls DEFAULT-LAMBDA.
In the current implementation, all of CASE-LAMBDA and DEFAULT-LAMBDA
must be LambdaExps, and the call must be inlined.
public TypeSwitch(String name)
public int numArgs()