code: public static InsnList returnValue(Type returnType, InsnList returnValueInsnList) {
          Validate.notNull(returnType);
          Validate.isTrue(returnType.getSort() != Type.METHOD);
  
          InsnList ret = new InsnList();
          
          ret.add(returnValueInsnList);
  
          switch (returnType.getSort()) {
              case Type.VOID:
                  ret.add(new InsnNode(Opcodes.RETURN));
                  break;
              case Type.BOOLEAN:
              case Type.BYTE:
              case Type.SHORT:
              case Type.CHAR:
              case Type.INT:
                  ret.add(new InsnNode(Opcodes.IRETURN));
                  break;
              case Type.LONG:
                  ret.add(new InsnNode(Opcodes.LRETURN));
                  break;
              case Type.FLOAT:
                  ret.add(new InsnNode(Opcodes.FRETURN));
                  break;
              case Type.DOUBLE:
                  ret.add(new InsnNode(Opcodes.DRETURN));
                  break;
              case Type.OBJECT:
              case Type.ARRAY:
                  ret.add(new InsnNode(Opcodes.ARETURN));
                  break;
              default:
                  throw new IllegalStateException();
          }
  
          return ret;
      }
docs: Generates instructions that returns a value.
  
  @param returnType return type of the method this generated bytecode is for
  @param returnValueInsnList instructions that produce the return value (should leave it on the top of the stack)
  @return instructions to return a value
  @throws NullPointerException if any argument is {@code null}
  @throws IllegalArgumentException if {@code returnType}'s sort is of {@link Type#METHOD}