本文整理汇总了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
}
}