本文整理汇总了C++中ConstantPool::method_handle_index_at方法的典型用法代码示例。如果您正苦于以下问题:C++ ConstantPool::method_handle_index_at方法的具体用法?C++ ConstantPool::method_handle_index_at怎么用?C++ ConstantPool::method_handle_index_at使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ConstantPool
的用法示例。
在下文中一共展示了ConstantPool::method_handle_index_at方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: print_constant
void BytecodePrinter::print_constant(int i, outputStream* st) {
int orig_i = i;
if (!check_index(orig_i, i, st)) return;
ConstantPool* constants = method()->constants();
constantTag tag = constants->tag_at(i);
if (tag.is_int()) {
st->print_cr(" " INT32_FORMAT, constants->int_at(i));
} else if (tag.is_long()) {
st->print_cr(" " INT64_FORMAT, constants->long_at(i));
} else if (tag.is_float()) {
st->print_cr(" %f", constants->float_at(i));
} else if (tag.is_double()) {
st->print_cr(" %f", constants->double_at(i));
} else if (tag.is_string()) {
const char* string = constants->string_at_noresolve(i);
st->print_cr(" %s", string);
} else if (tag.is_klass()) {
st->print_cr(" %s", constants->resolved_klass_at(i)->external_name());
} else if (tag.is_unresolved_klass()) {
st->print_cr(" <unresolved klass at %d>", i);
} else if (tag.is_method_type()) {
int i2 = constants->method_type_index_at(i);
st->print(" <MethodType> %d", i2);
print_symbol(constants->symbol_at(i2), st);
} else if (tag.is_method_handle()) {
int kind = constants->method_handle_ref_kind_at(i);
int i2 = constants->method_handle_index_at(i);
st->print(" <MethodHandle of kind %d>", kind, i2);
print_field_or_method(-i, i2, st);
} else {
st->print_cr(" bad tag=%d at %d", tag.value(), i);
}
}