private Symbol addBootstrapMethod(final int offset, final int length, final int hashCode) {
    final byte[] bootstrapMethodsData = bootstrapMethods.data;
    Entry entry = get(hashCode);
    while (entry != null) {
      if (entry.tag == Symbol.BOOTSTRAP_METHOD_TAG && entry.hashCode == hashCode) {
        int otherOffset = (int) entry.data;
        boolean isSameBootstrapMethod = true;
        for (int i = 0; i < length; ++i) {
          if (bootstrapMethodsData[offset + i] != bootstrapMethodsData[otherOffset + i]) {
            isSameBootstrapMethod = false;
            break;
          }
        }
        if (isSameBootstrapMethod) {
          bootstrapMethods.length = offset; // Revert to old position.
          return entry;
        }
      }
      entry = entry.next;
    }
    return put(new Entry(bootstrapMethodCount++, Symbol.BOOTSTRAP_METHOD_TAG, offset, hashCode));
  }
private Symbol addBootstrapMethod ( final int offset , final int length , final int hashCode ) { final byte [ ] bootstrapMethodsData = bootstrapMethods . data ; Entry entry = get ( hashCode ) ; while ( entry != null ) { if ( entry . tag == Symbol . BOOTSTRAP_METHOD_TAG && entry . hashCode == hashCode ) { int otherOffset = ( int ) entry . data ; boolean isSameBootstrapMethod = true ; for ( int i = 0 ; i < length ; ++ i ) { if ( bootstrapMethodsData [ offset + i ] != bootstrapMethodsData [ otherOffset + i ] ) { isSameBootstrapMethod = false ; break ; } } if ( isSameBootstrapMethod ) { bootstrapMethods . length = offset ; return entry ; } } entry = entry . next ; } return put ( new Entry ( bootstrapMethodCount ++ , Symbol . BOOTSTRAP_METHOD_TAG , offset , hashCode ) ) ; }
Adds a bootstrap method to the BootstrapMethods attribute of this symbol table. Does nothing if
the BootstrapMethods already contains a similar bootstrap method (more precisely, reverts the
content of {@link #bootstrapMethods} to remove the last, duplicate bootstrap method).

@param offset the offset of the last bootstrap method in {@link #bootstrapMethods}, in bytes.
@param length the length of this bootstrap method in {@link #bootstrapMethods}, in bytes.
@param hashCode the hash code of this bootstrap method.
@return a new or already existing Symbol with the given value.