agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File 7088955 Cdiff agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java

agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java

Print this page

        

*** 170,180 **** } private String value; } ! private int getInitStateAsInt() { return (int) initState.getValue(this); } public ClassState getInitState() { int state = getInitStateAsInt(); if (state == CLASS_STATE_UNPARSABLE_BY_GC) { return ClassState.UNPARSABLE_BY_GC; } else if (state == CLASS_STATE_ALLOCATED) { --- 170,180 ---- } private String value; } ! public int getInitStateAsInt() { return (int) initState.getValue(this); } public ClassState getInitState() { int state = getInitStateAsInt(); if (state == CLASS_STATE_UNPARSABLE_BY_GC) { return ClassState.UNPARSABLE_BY_GC; } else if (state == CLASS_STATE_ALLOCATED) {
*** 494,503 **** --- 494,526 ---- public Klass getJavaSuper() { return getSuper(); } + public static class StaticField { + public AccessFlags flags; + public Field field; + + StaticField(Field field, AccessFlags flags) { + this.field = field; + this.flags = flags; + } + } + + public Field[] getStaticFields() { + TypeArray fields = getFields(); + int length = (int) fields.getLength(); + ArrayList result = new ArrayList(); + for (int index = 0; index < length; index += NEXT_OFFSET) { + Field f = newField(index); + if (f.isStatic()) { + result.add(f); + } + } + return (Field[])result.toArray(new Field[result.size()]); + } + public void iterateNonStaticFields(OopVisitor visitor, Oop obj) { if (getSuper() != null) { ((InstanceKlass) getSuper()).iterateNonStaticFields(visitor, obj); } TypeArray fields = getFields();
agent/src/share/classes/sun/jvm/hotspot/oops/InstanceKlass.java
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File