code: public MethodRefConstant addMethodRef(String className,
                                          String name,
                                          String type)
    {
      MethodRefConstant entry = getMethodRef(className, name, type);
  
      if (entry != null)
        return entry;
  
      ClassConstant classEntry = addClass(className);
      NameAndTypeConstant typeEntry = addNameAndType(name, type);
  
      entry = new MethodRefConstant(this, _entries.size(),
                                    classEntry.getIndex(),
                                    typeEntry.getIndex());
  
      addConstant(entry);
  
      return entry;
    }
docs: Adds a method ref constant.