code: public MethodInfo addMethod(Method method) {
          Modifiers modifiers = new Modifiers(method.getModifiers());
          modifiers.setAbstract(this.getModifiers().isInterface());
  
          TypeVariableDesc[] typeParams = lookupTypeVariables(method);
          TypeDesc ret = TypeDesc.forClass(method.getReturnType(),
                                           method.getGenericReturnType());
  
          MethodDescriptor methodDescriptor = lookupMethodDescriptor(method);
  
          Class<?>[] paramClasses = method.getParameterTypes();
          Type[] paramTypes = method.getGenericParameterTypes();
          TypeDesc[] params = new TypeDesc[paramClasses.length];
          String[] paramNames = new String[paramClasses.length];
          for (int i = 0; i < paramClasses.length; i++) {
              params[i] = TypeDesc.forClass(paramClasses[i], paramTypes[i]);
              if(methodDescriptor != null) {
                  paramNames[i] =
                      methodDescriptor.getParameterDescriptors()[i].getName();
              } else {
                  paramNames[i] = "param$" + i;
              }
          }
  
          MethodInfo mi = addMethod(modifiers, method.getName(), typeParams,
                                    ret, params, paramNames);
  
          // exception stuff...
          // TODO: generic exceptions
          Class<?>[] exceptions = method.getExceptionTypes();
          for (int i=0; i<exceptions.length; i++) {
              mi.addException(exceptions[i].getName());
          }
  
          return mi;
      }
docs: Add a method to this class. This method is handy for implementing
  methods defined by a pre-existing interface.