本文整理汇总了Java中sun.jvm.hotspot.types.Field类的典型用法代码示例。如果您正苦于以下问题:Java Field类的具体用法?Java Field怎么用?Java Field使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Field类属于sun.jvm.hotspot.types包,在下文中一共展示了Field类的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: dumpFields
import sun.jvm.hotspot.types.Field; //导入依赖的package包/类
void dumpFields(Type type, boolean allowStatic) {
Iterator i = type.getFields();
while (i.hasNext()) {
Field f = (Field) i.next();
if (!allowStatic && f.isStatic()) continue;
out.print("field ");
quote(type.getName());
out.print(" ");
out.print(f.getName());
out.print(" ");
quote(f.getType().getName());
out.print(" ");
out.print(f.isStatic());
out.print(" ");
if (f.isStatic()) {
out.print("0 ");
out.print(f.getStaticFieldAddress());
} else {
out.print(f.getOffset());
out.print(" 0x0");
}
out.println();
}
}
示例2: dumpFields
import sun.jvm.hotspot.types.Field; //导入依赖的package包/类
void dumpFields(Type type) {
Iterator i = type.getFields();
while (i.hasNext()) {
Field f = (Field) i.next();
out.print("field ");
quote(type.getName());
out.print(" ");
out.print(f.getName());
out.print(" ");
quote(f.getType().getName());
out.print(" ");
out.print(f.isStatic());
out.print(" ");
if (f.isStatic()) {
out.print("0 ");
out.print(f.getStaticFieldAddress());
} else {
out.print(f.getOffset());
out.print(" 0x0");
}
out.println();
}
}