本文整理汇总了C++中ConstantPool::invoke_dynamic_bootstrap_method_ref_index_at方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstantPool::invoke_dynamic_bootstrap_method_ref_index_at方法的具体用法?C++ ConstantPool::invoke_dynamic_bootstrap_method_ref_index_at怎么用?C++ ConstantPool::invoke_dynamic_bootstrap_method_ref_index_at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConstantPool
的用法示例。
在下文中一共展示了ConstantPool::invoke_dynamic_bootstrap_method_ref_index_at方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: print_field_or_method
void BytecodePrinter::print_field_or_method(int orig_i, int i, outputStream* st) {
ConstantPool* constants = method()->constants();
constantTag tag = constants->tag_at(i);
bool has_klass = true;
switch (tag.value()) {
case JVM_CONSTANT_InterfaceMethodref:
case JVM_CONSTANT_Methodref:
case JVM_CONSTANT_Fieldref:
break;
case JVM_CONSTANT_NameAndType:
case JVM_CONSTANT_InvokeDynamic:
has_klass = false;
break;
default:
st->print_cr(" bad tag=%d at %d", tag.value(), i);
return;
}
Symbol* name = constants->uncached_name_ref_at(i);
Symbol* signature = constants->uncached_signature_ref_at(i);
const char* sep = (tag.is_field() ? "/" : "");
if (has_klass) {
Symbol* klass = constants->klass_name_at(constants->uncached_klass_ref_index_at(i));
st->print_cr(" %d <%s.%s%s%s> ", i, klass->as_C_string(), name->as_C_string(), sep, signature->as_C_string());
} else {
if (tag.is_invoke_dynamic()) {
int bsm = constants->invoke_dynamic_bootstrap_method_ref_index_at(i);
st->print(" bsm=%d", bsm);
}
st->print_cr(" %d <%s%s%s>", i, name->as_C_string(), sep, signature->as_C_string());
}
}