Top


定義場所(file name)

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

説明(description)

// throws linktime exceptions

名前(function name)

void LinkResolver::linktime_resolve_static_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() を呼んで, 対象メソッドの解決処理を行う.
      ---------------------------------------- -}

      resolve_method(resolved_method, resolved_klass, method_name, method_signature, current_klass, check_access, CHECK);

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

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

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

      // check if static
      if (!resolved_method->is_static()) {
        ResourceMark rm(THREAD);
        char buf[200];
        jio_snprintf(buf, sizeof(buf), "Expected 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.