本文整理汇总了C++中KlassHandle::subklass方法的典型用法代码示例。如果您正苦于以下问题:C++ KlassHandle::subklass方法的具体用法?C++ KlassHandle::subklass怎么用?C++ KlassHandle::subklass使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类KlassHandle
的用法示例。
在下文中一共展示了KlassHandle::subklass方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: process_class
void CHA::process_class(KlassHandle r, GrowableArray<KlassHandle>* receivers, GrowableArray<methodHandle>* methods, symbolHandle name, symbolHandle signature) {
// recursively add non-abstract subclasses of r to receivers list
assert(!r->is_interface(), "should call process_interface instead");
for (Klass* s = r->subklass(); s != NULL && !methods->is_full(); s = s->next_sibling()) {
// preorder traversal, so check subclasses first
if (s->is_interface()) {
// can only happen if r == Object
assert(r->superklass() == NULL, "must be klass Object");
} else {
process_class(s, receivers, methods, name, signature);
}
}
// now check r itself (after subclasses because of preorder)
if (!methods->is_full()) {
// don't add abstract classes to receivers list
// (but still consider their methods -- they may be non-abstract)
if (!receivers->is_full() && !r->is_abstract()) receivers->push(r);
methodOop m = NULL;
if (r->oop_is_instance()) m = instanceKlass::cast(r())->find_method(name(), signature());
if (m != NULL && !m->is_abstract()) {
if (!methods->contains(m)) methods->push(m);
}
}
}