当前位置: 首页>>代码示例>>C++>>正文


C++ instanceKlassHandle::is_interface方法代码示例

本文整理汇总了C++中instanceKlassHandle::is_interface方法的典型用法代码示例。如果您正苦于以下问题:C++ instanceKlassHandle::is_interface方法的具体用法?C++ instanceKlassHandle::is_interface怎么用?C++ instanceKlassHandle::is_interface使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在instanceKlassHandle的用法示例。


在下文中一共展示了instanceKlassHandle::is_interface方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: process_interface

void CHA::process_interface(instanceKlassHandle r, GrowableArray<KlassHandle>* receivers, GrowableArray<methodHandle>* methods, 
                            symbolHandle name, symbolHandle signature) {
  // recursively add non-abstract implementors of interface r to receivers list
  assert(r->is_interface(), "should call process_class instead");
  
  // We only store the implementors for an interface, if there is exactly one implementor  
  klassOop k = r->implementor();
  assert(k == NULL || r->nof_implementors() == 1, "inconsistent implementor list");
  if (k != NULL && !methods->is_full()) {   
    instanceKlass* kl = instanceKlass::cast(k);
    assert(kl->oop_is_instance(), "primitive klasses don't implement interfaces");
    assert(!kl->is_interface(), "must be a real klass");
    process_class(kl, receivers, methods, name, signature);
  }

  // now process all subinterfaces
  for (Klass* s = r->subklass(); s != NULL && !methods->is_full(); s = s->next_sibling()) {
    assert(s->is_interface(), "must be an interface");
    instanceKlassHandle sub(s->as_klassOop());
    process_interface(sub, receivers, methods, name, signature);
    if (methods->is_full()) break;          // give up -- too many overriding methods
  }
}
开发者ID:subxiang,项目名称:jdk-source-code,代码行数:23,代码来源:cha.cpp


注:本文中的instanceKlassHandle::is_interface方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。