// Convert return value if needed.
InstructionFactory factory = il.getInstructionFactory();
if ("int".equals(rType)) {
try {
JiapiClass jc = new Loader().loadClass("java.lang.Integer");
JiapiMethod jm =
jc.getDeclaredMethod("intValue", new String[0]);
il.add(factory.cast("java.lang.Integer"));
il.add(factory.invoke(jm));
}
catch(Exception e) {
e.printStackTrace();
}
}
else if ("long".equals(rType)) {
try {
JiapiClass jc = new Loader().loadClass("java.lang.Long");
JiapiMethod jm =
jc.getDeclaredMethod("longValue", new String[0]);
il.add(factory.cast("java.lang.Long"));
il.add(factory.invoke(jm));
}
catch(Exception e) {
e.printStackTrace();
}
}
else if ("char".equals(rType)) {
try {
JiapiClass jc = new Loader().loadClass("java.lang.Character");
JiapiMethod jm =
jc.getDeclaredMethod("charValue", new String[0]);
il.add(factory.cast("java.lang.Character"));
il.add(factory.invoke(jm));
}
catch(Exception e) {
e.printStackTrace();
}
}
else if ("boolean".equals(rType)) {
try {
JiapiClass jc = new Loader().loadClass("java.lang.Boolean");
JiapiMethod jm =
jc.getDeclaredMethod("booleanValue", new String[0]);
il.add(factory.cast("java.lang.Boolean"));
il.add(factory.invoke(jm));
}
catch(Exception e) {
e.printStackTrace();
}
}
else if ("byte".equals(rType)) {
try {
JiapiClass jc = new Loader().loadClass("java.lang.Byte");
JiapiMethod jm =
jc.getDeclaredMethod("byteValue", new String[0]);
il.add(factory.cast("java.lang.Byte"));
il.add(factory.invoke(jm));
}
catch(Exception e) {
e.printStackTrace();
}
}
else if ("float".equals(rType)) {
try {
JiapiClass jc = new Loader().loadClass("java.lang.Float");
JiapiMethod jm =
jc.getDeclaredMethod("floatValue", new String[0]);
il.add(factory.cast("java.lang.Float"));
il.add(factory.invoke(jm));
}
catch(Exception e) {
e.printStackTrace();
}
}
else if ("double".equals(rType)) {
try {
JiapiClass jc = new Loader().loadClass("java.lang.Double");
JiapiMethod jm =
jc.getDeclaredMethod("doubleValue", new String[0]);
il.add(factory.cast("java.lang.Double"));
il.add(factory.invoke(jm));