Top


定義場所(file name)

hotspot/src/share/vm/interpreter/linkResolver.cpp

説明(description)

// throws linktime exceptions

名前(function name)

void LinkResolver::linktime_resolve_virtual_method(methodHandle &resolved_method, KlassHandle resolved_klass,
                                                   Symbol* method_name, Symbol* method_signature,
                                                   KlassHandle current_klass, bool check_access, TRAPS) {

本体部(body)

  {- -------------------------------------------
  (1) LinkResolver::resolve_method() を呼んで, 対象メソッドの解決処理を行う.
      ---------------------------------------- -}

      // normal method resolution
      resolve_method(resolved_method, resolved_klass, method_name, method_signature, current_klass, check_access, CHECK);

  {- -------------------------------------------
  (1) (assert)
      ---------------------------------------- -}

      assert(resolved_method->name() != vmSymbols::object_initializer_name(), "should have been checked in verifier");
      assert(resolved_method->name() != vmSymbols::class_initializer_name (), "should have been checked in verifier");

  {- -------------------------------------------
  (1) もし解決結果が static method であれば IncompatibleClassChangeError.
      ---------------------------------------- -}

      // check if not static
      if (resolved_method->is_static()) {
        ResourceMark rm(THREAD);
        char buf[200];
        jio_snprintf(buf, sizeof(buf), "Expecting non-static method %s", methodOopDesc::name_and_sig_as_C_string(Klass::cast(resolved_klass()),
                                                                                                                 resolved_method->name(),
                                                                                                                 resolved_method->signature()));
        THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(), buf);
      }
    }

This document is available under the GNU GENERAL PUBLIC LICENSE Version 2.