gnu.kawa.reflect
Class TypeSwitch
- CanInline, Inlineable, Named
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.
apply , apply , apply0 , apply1 , apply2 , apply3 , apply4 , applyN , check0 , check1 , check2 , check3 , check4 , checkArgCount , checkN , getSetter , getSourceLocation , match0 , match1 , match2 , match3 , match4 , matchN , maxArgs , minArgs , numArgs , set0 , set1 , setN , setSetter , setSourceLocation , toString |
typeSwitch
public static final TypeSwitch typeSwitch
TypeSwitch
public TypeSwitch(String name)