code: public void invokevirtual(ExecutableElement method) throws IOException
      {
          if (method.getEnclosingElement().getKind() == ElementKind.INTERFACE)
          {
              int index = subClass.resolveInterfaceMethodIndex(method);
              invokeinterface(index, argumentCount(method.getParameters()));
          }
          else
          {
              int index = subClass.resolveMethodIndex(method);
              invokevirtual(index);
          }
      }
docs: Invoke instance method; dispatch based on classIf method is interface
  calls invokeinterface otherwise calls invokevirtual.
  <p>Stack: ..., objectref, [arg1, [arg2 ...]] =&gt; ...
  @param method
  @throws IOException