public MethodDefinition loadConstant(int value)
{
switch (value) {
case -1:
instructionList.add(new InsnNode(ICONST_M1));
break;
case 0:
instructionList.add(new InsnNode(ICONST_0));
break;
case 1:
instructionList.add(new InsnNode(ICONST_1));
break;
case 2:
instructionList.add(new InsnNode(ICONST_2));
break;
case 3:
instructionList.add(new InsnNode(ICONST_3));
break;
case 4:
instructionList.add(new InsnNode(ICONST_4));
break;
case 5:
instructionList.add(new InsnNode(ICONST_5));
break;
default:
instructionList.add(new LdcInsnNode(value));
break;
}