code: protected int getRefIndex(Class<? extends Ref> refType, String fullyQualifiedname, String name, String descriptor)
      {
          String internalForm = fullyQualifiedname.replace('.', '/');
          for (ConstantInfo ci : listConstantInfo(refType))
          {
              Ref mr = (Ref) ci;
              int classIndex = mr.getClass_index();
              Clazz clazz = (Clazz) getConstantInfo(classIndex);
              String cn = getString(clazz.getName_index());
              if (internalForm.equals(cn))
              {
                  int nameAndTypeIndex = mr.getName_and_type_index();
                  NameAndType nat = (NameAndType) getConstantInfo(nameAndTypeIndex);
                  int nameIndex = nat.getName_index();
                  String str = getString(nameIndex);
                  if (name.equals(str))
                  {
                      int descriptorIndex = nat.getDescriptor_index();
                      String descr = getString(descriptorIndex);
                      if (descriptor.equals(descr))
                      {
                          return constantPoolIndexMap.get(ci);
                      }
                  }
              }
          }
          return -1;
      }
docs: Returns the constant map index to reference
  @param refType
  @param fullyQualifiedname
  @param name
  @param descriptor
  @return