本文整理汇总了Java中com.sun.tools.classfile.AccessFlags.ignore方法的典型用法代码示例。如果您正苦于以下问题:Java AccessFlags.ignore方法的具体用法?Java AccessFlags.ignore怎么用?Java AccessFlags.ignore使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类com.sun.tools.classfile.AccessFlags
的用法示例。
在下文中一共展示了AccessFlags.ignore方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: visitInnerClasses
import com.sun.tools.classfile.AccessFlags; //导入方法依赖的package包/类
public Void visitInnerClasses(InnerClasses_attribute attr, Void ignore) {
boolean first = true;
if (options.compat) {
writeInnerClassHeader();
first = false;
}
for (int i = 0 ; i < attr.classes.length; i++) {
InnerClasses_attribute.Info info = attr.classes[i];
//access
AccessFlags access_flags = info.inner_class_access_flags;
if (options.compat) {
// BUG 6622215: javap ignores certain relevant access flags
access_flags = access_flags.ignore(ACC_STATIC | ACC_PROTECTED | ACC_PRIVATE | ACC_INTERFACE | ACC_SYNTHETIC | ACC_ENUM);
// BUG 6622232: javap gets whitespace confused
print(" ");
}
if (options.checkAccess(access_flags)) {
if (first) {
writeInnerClassHeader();
first = false;
}
print(" ");
for (String name: access_flags.getInnerClassModifiers())
print(name + " ");
if (info.inner_name_index!=0) {
print("#" + info.inner_name_index + "= ");
}
print("#" + info.inner_class_info_index);
if (info.outer_class_info_index != 0) {
print(" of #" + info.outer_class_info_index);
}
print("; //");
if (info.inner_name_index != 0) {
print(getInnerName(constant_pool, info) + "=");
}
constantWriter.write(info.inner_class_info_index);
if (info.outer_class_info_index != 0) {
print(" of ");
constantWriter.write(info.outer_class_info_index);
}
println();
}
}
if (!first)
indent(-1);
return null;
}