// Copy from javassist.bytecode.annotation.Annotation.createMemberValue(ConstPool, CtClass);
private static MemberValue createMemberValue(ConstPool cp, CtClass type, Object value) throws NotFoundException {
if (type == CtClass.booleanType)
return new BooleanMemberValue((Boolean) value, cp);
else if (type == CtClass.byteType)
return new ByteMemberValue((Byte) value, cp);
else if (type == CtClass.charType)
return new CharMemberValue((Character) value, cp);
else if (type == CtClass.shortType)
return new ShortMemberValue((Short) value, cp);
else if (type == CtClass.intType)