/**
   * Adds a given bootstrap method to the bootstrap methods attribute.
   *
   * @return the index of the bootstrap method.
   */
  public int addBootstrapMethodInfo(BootstrapMethodInfo bootstrapMethodInfo) {
    targetBootstrapMethodsAttribute.bootstrapMethods =
        (BootstrapMethodInfo[])
            ArrayUtil.add(
                targetBootstrapMethodsAttribute.bootstrapMethods,
                targetBootstrapMethodsAttribute.u2bootstrapMethodsCount,
                bootstrapMethodInfo);

    return targetBootstrapMethodsAttribute.u2bootstrapMethodsCount++;
  }