code: public static InsnList merge(Object... insns) {
          Validate.notNull(insns);
          Validate.noNullElements(insns);
  
          InsnList ret = new InsnList();
          for (Object insn : insns) {
              if (insn instanceof AbstractInsnNode) {
                  // add single instruction
                  AbstractInsnNode insnNode = (AbstractInsnNode) insn;
                  ret.add(insnNode);
              } else if (insn instanceof InsnList) {
                  // add instruction list
                  InsnList insnList = (InsnList) insn;
                  for (int i = 0; i < insnList.size(); i++) {
                      Validate.notNull(insnList.get(i));
                  }
                  ret.add((InsnList) insn);
              } else if (insn instanceof InstructionGenerator) {
                  // generate conditional merger instruction list and add
                  InsnList insnList = ((InstructionGenerator) insn).generate();
                  for (int i = 0; i < insnList.size(); i++) {
                      Validate.notNull(insnList.get(i));
                  }
                  ret.add(insnList);
              } else {
                  // unrecognized
                  throw new IllegalArgumentException();
              }
          }
  
          return ret;
      }
docs: Combines multiple instructions in to a single instruction list. You can include normal instructions ({@link AbstractInsnNode}),
  instruction lists ({@link InsnList}), or instruction generators ({@link InstructionGenerator}).
  @param insns instructions
  @throws NullPointerException if any argument is {@code null} or contains {@code null}
  @return merged instructions