private void generateMethod(Method method,
                              String className)
  {
    CodeVisitor mw = _classWriter.visitMethod(method.getModifiers()
                                              ^ ACC_ABSTRACT,
                                              method.getName(),
                                              Type.getMethodDescriptor(method),
                                              toInternalNames(method.getExceptionTypes()),
                                              null
    );
    Class type = getClassOfMethodSubject(method);
    if (isPrimitive(method)) {
      if (isReader(method)) {
        generatePrimitiveReader(mw, method, className);
      }
      else {
        generatePrimitiveWriter(mw, method, className);
      }
    }
    else if (type == Reader.class || type == Writer.class) {
      if (isReader(method)) {
        generateObjectReaderFromReader(mw, method, className);
      }
      else {
        generateObjectWriterToWriter(mw, method, className);
      }
    }
    else if (type == InputStream.class || type == OutputStream.class) {
      if (isReader(method)) {
        generateObjectReaderFromInputStream(mw, method, className);
      }
      else {
        generateObjectWriterToOutputStream(mw, method, className);
      }
    }
    else {
      if (isReader(method)) {
        generateObjectReader(mw, method, className);
      }
      else {
        generateObjectWriter(mw, method, className);
      }
    }
  }