private static void changeToPrimitiveIfNeeded(InjectionPoint injectionPoint, MethodVisitor mv, Class<?> wrapperClass, boolean ignoreNullValues) { if (TypeHelper.isPrimitive(injectionPoint.parameter.getType())) { mv.visitVarInsn(ALOAD, 4); String methodSuffix = getPrimitiveMethodSuffix(injectionPoint.parameter); String valueMethodPrefix = methodSuffix.toLowerCase(); if ("character".equals(valueMethodPrefix)) { valueMethodPrefix = "char"; } String valueMethod = valueMethodPrefix + "Value"; AsmUtils.invoke(mv, wrapperClass, valueMethod, "()" + AsmUtils.toAsmType(injectionPoint.parameter.getType())); mv.visitVarInsn(AsmUtils.getStoreOps(injectionPoint.parameter.getType()), 4); } }
private static void changeToPrimitiveIfNeeded(InjectionPoint injectionPoint, MethodVisitor mv, Class<?> wrapperClass, boolean ignoreNullValues) { if (TypeHelper.isPrimitive(injectionPoint.parameter.getType())) { mv.visitVarInsn(ALOAD, 4); String methodSuffix = getPrimitiveMethodSuffix(injectionPoint.parameter); String valueMethodPrefix = methodSuffix.toLowerCase(); if ("character".equals(valueMethodPrefix)) { valueMethodPrefix = "char"; } String valueMethod = valueMethodPrefix + "Value"; AsmUtils.invoke(mv, wrapperClass, valueMethod, "()" + AsmUtils.toAsmType(injectionPoint.parameter.getType())); mv.visitVarInsn(AsmUtils.getStoreOps(injectionPoint.parameter.getType()), 4); } }
private static void changeToPrimitiveIfNeeded(Parameter p, MethodVisitor mv, Class<?> wrapperClass, boolean ignoreNullValues) { if (TypeHelper.isPrimitive(p.getType())) { if (ignoreNullValues) { mv.visitVarInsn(ALOAD, 3); } String methodSuffix = getPrimitiveMethodSuffix(p); String valueMethodPrefix = methodSuffix.toLowerCase(); if ("character".equals(valueMethodPrefix)) { valueMethodPrefix = "char"; } String valueMethod = valueMethodPrefix + "Value"; AsmUtils.invoke(mv, wrapperClass, valueMethod, "()" + AsmUtils.toAsmType(p.getType())); if (ignoreNullValues) { mv.visitVarInsn(AsmUtils.getStoreOps(p.getType()), 3); } } }
private static void changeToPrimitiveIfNeeded(Parameter p, MethodVisitor mv, Class<?> wrapperClass, boolean ignoreNullValues) { if (TypeHelper.isPrimitive(p.getType())) { if (ignoreNullValues) { mv.visitVarInsn(ALOAD, 3); } String methodSuffix = getPrimitiveMethodSuffix(p); String valueMethodPrefix = methodSuffix.toLowerCase(); if ("character".equals(valueMethodPrefix)) { valueMethodPrefix = "char"; } String valueMethod = valueMethodPrefix + "Value"; AsmUtils.invoke(mv, wrapperClass, valueMethod, "()" + AsmUtils.toAsmType(p.getType())); if (ignoreNullValues) { mv.visitVarInsn(AsmUtils.getStoreOps(p.getType()), 3); } } }
mv.visitVarInsn(AsmUtils.getStoreOps(injectionPoint.parameter.getType()), 4); if (consumer != null) { consumer.accept(mv);
mv.visitVarInsn(AsmUtils.getStoreOps(injectionPoint.parameter.getType()), 4); if (consumer != null) { consumer.accept(mv);