void (final MethodVisitor mv, final int index) { new SwitchGenerator<String>() { @Override protected String getSwitchedValue(ReportingPlace place) { return index < place.args.length ? place.args[index] : null; } @Override void generateCaseBody(String value) { if (value != null) { mv.visitInsn(DUP); pushIntConstant(mv, index); mv.visitLdcInsn(value); mv.visitInsn(AASTORE); } } }.generateSwitch(mv); }