static VM_Method readMethod(VM_Class declaringClass, VM_MemberReference memRef,
static VM_Method readMethod(VM_TypeReference declaringClass, int constantPool[], VM_MemberReference memRef,
  static VM_Method readMethod(VM_Class declaringClass, VM_MemberReference memRef,                              int modifiers, DataInputStream input) throws IOException {    ClassLoader cl = declaringClass.getClassLoader();    int tmp_localWords = 0;    int tmp_operandWords = 0;          byte[] tmp_bytecodes = null;           VM_ExceptionHandlerMap tmp_exceptionHandlerMap = null;    VM_TypeReference[] tmp_exceptionTypes = null;    int[] tmp_lineNumberMap = null;          // Read the attributes    for (int i = 0, n = input.readUnsignedShort(); i<n; i++) {      VM_Atom attName   = declaringClass.getUtf(input.readUnsignedShort());      int     attLength = input.readInt();      // Only bother to interpret non-boring Method attributes      if (attName == VM_ClassLoader.codeAttributeName) {        tmp_operandWords = input.readUnsignedShort();        tmp_localWords   = input.readUnsignedShort();        tmp_bytecodes = new byte[input.readInt()];        input.readFully(tmp_bytecodes);        int cnt = input.readUnsignedShort();        if (cnt != 0) {          tmp_exceptionHandlerMap = new VM_ExceptionHandlerMap(input, declaringClass, cnt);        }        // Read the attributes portion of the code attribute        for (int j = 0, n2 = input.readUnsignedShort(); j<n2; j++) {          attName   = declaringClass.getUtf(input.readUnsignedShort());          attLength = input.readInt();          if (attName == VM_ClassLoader.lineNumberTableAttributeName) {            cnt = input.readUnsignedShort();            if (cnt != 0) {              tmp_lineNumberMap = new int[cnt];              for (int k = 0; k<cnt; k++) {                int startPC = input.readUnsignedShort();                int lineNumber = input.readUnsignedShort();                tmp_lineNumberMap[k] = (lineNumber << BITS_IN_SHORT) | startPC;              }            }          } else {            // All other entries in the attribute portion of the code attribute are boring.            input.skipBytes(attLength);          }        }      } else if (attName == VM_ClassLoader.exceptionsAttributeName) {        int cnt = input.readUnsignedShort();        if (cnt != 0) {          tmp_exceptionTypes = new VM_TypeReference[cnt];          for (int j = 0, m = tmp_exceptionTypes.length; j < m; ++j) {            tmp_exceptionTypes[j] = declaringClass.getTypeRef(input.readUnsignedShort());          }        }		} else if (attName == VM_ClassLoader.syntheticAttributeName) {		  modifiers |= SYNTHETIC;      } else {        // all other method attributes are boring        input.skipBytes(attLength);      }    }    if ((modifiers & ACC_NATIVE) != 0) {      return new VM_NativeMethod(declaringClass, memRef, modifiers, tmp_exceptionTypes);    } else if ((modifiers & ACC_ABSTRACT) != 0) {      return new VM_AbstractMethod(declaringClass, memRef, modifiers, tmp_exceptionTypes);    } else {      return new VM_NormalMethod(declaringClass, memRef, modifiers, tmp_exceptionTypes,                                 tmp_localWords, tmp_operandWords, tmp_bytecodes,                                  tmp_exceptionHandlerMap, tmp_lineNumberMap);    }  }