if (fmds.length == 0)
throwException(code, IllegalArgumentException.class);
else {
// switch (val)
code.iload().setLocal(relLocal);
TableSwitchInstruction tabins = code.tableswitch();
tabins.setLow(0);
tabins.setHigh(fmds.length - 1);
// <field> = pcStateManager.provided<type>Field
// (this, fieldNumber);
for (int i = 0; i < fmds.length; i++) {
tabins.addTarget(loadManagedInstance(code, false));
code.getfield().setField(SM, SMTYPE);
loadManagedInstance(code, false);
code.iload().setParam(0);
loadManagedInstance(code, false);
addGetManagedValueCode(code, fmds[i]);
code.invokeinterface().setMethod(getStateManagerMethod
(fmds[i].getDeclaredType(), "provided", false, false));
code.vreturn();
}
// default: throw new IllegalArgumentException ()
tabins.setDefaultTarget(throwException
(code, IllegalArgumentException.class));
}
code.calculateMaxStack();
code.calculateMaxLocals();