private MethodInfo readMethod() throws IOException {
    MethodInfo methodInfo = new MethodInfo();

    methodInfo.setAccessFlags(is.readUnsignedShort());
    methodInfo.setNameIndex(is.readUnsignedShort());
    methodInfo.setDescriptorIndex(is.readUnsignedShort());
    int attributesCount = is.readUnsignedShort();

    methodInfo.setAttributes(new AbstractAttribute[attributesCount]);

    for (int i = 0; i < attributesCount; i++) {
      AbstractAttribute attribute = attributeFacility.readAttribute();
      if (isInterceptorAnnotation(attribute)) {
        methodInfo.setInterceptorClass(
            ((RuntimeInvisibleAnnotations) attribute).getInterceptorClass());
      }
      methodInfo.getAttributes()[i] = attribute;
      if (attribute.getClass() == Code.class) {
        methodInfo.setCode((Code) attribute);
      }
    }

    methodInfo.setSignature(getMethodSignature(methodInfo));
    methodInfo.setMethodName(constantPool.getUtf8(methodInfo.getNameIndex()).getString());

    return methodInfo;
  }
  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
  }