private void fixupSignature(MethodSignature signature) throws IOException {
    int classNameIndex = signature.getClassNameIndex();
    String dottedName = constantPool.getUtf8(classNameIndex).getString().replace("/", ".");
    signature.setClassNameIndex(getOrInsertUtf8(dottedName));

    signature.setMethodNameIndex(
        getOrInsertString(signature.getMethodNameIndex())); // will be a String resource now
    signature.setClassNameIndex(
        getOrInsertString(signature.getClassNameIndex())); // will be a String resource now
  }
  private Map<String, Integer> getOrInsertPrimitiveWrapperMethods(MethodSignature signature)
      throws IOException {
    Map<String, Integer> methodRefs = new HashMap<String, Integer>();

    int valueOfString = getOrInsertUtf8("valueOf");

    for (String paramType : signature.getParamTypes()) {
      char baseType = paramType.charAt(0);
      Class wrapperClass = getWrapperClass(baseType);
      if (wrapperClass != null) {
        int wrapperMethod = getOrInsertPrimitiveWrappeMethod(wrapperClass, baseType, valueOfString);
        methodRefs.put(paramType, wrapperMethod);
      }
    }

    return methodRefs;
  }