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

Print this page
rev 146 : [mq]: mixa.layout.patch


  71     localInterfaces      = new OopField(type.getOopField("_local_interfaces"), Oop.getHeaderSize());
  72     transitiveInterfaces = new OopField(type.getOopField("_transitive_interfaces"), Oop.getHeaderSize());
  73     nofImplementors      = new CIntField(type.getCIntegerField("_nof_implementors"), Oop.getHeaderSize());
  74     IMPLEMENTORS_LIMIT   = db.lookupIntConstant("instanceKlass::implementors_limit").intValue();
  75     implementors         = new OopField[IMPLEMENTORS_LIMIT];
  76     for (int i = 0; i < IMPLEMENTORS_LIMIT; i++) {
  77       long arrayOffset = Oop.getHeaderSize() + (i * db.getAddressSize());
  78       implementors[i]    = new OopField(type.getOopField("_implementors[0]"), arrayOffset);
  79     }
  80     fields               = new OopField(type.getOopField("_fields"), Oop.getHeaderSize());
  81     constants            = new OopField(type.getOopField("_constants"), Oop.getHeaderSize());
  82     classLoader          = new OopField(type.getOopField("_class_loader"), Oop.getHeaderSize());
  83     protectionDomain     = new OopField(type.getOopField("_protection_domain"), Oop.getHeaderSize());
  84     signers              = new OopField(type.getOopField("_signers"), Oop.getHeaderSize());
  85     sourceFileName       = new OopField(type.getOopField("_source_file_name"), Oop.getHeaderSize());
  86     sourceDebugExtension = new OopField(type.getOopField("_source_debug_extension"), Oop.getHeaderSize());
  87     innerClasses         = new OopField(type.getOopField("_inner_classes"), Oop.getHeaderSize());
  88     nonstaticFieldSize   = new CIntField(type.getCIntegerField("_nonstatic_field_size"), Oop.getHeaderSize());
  89     staticFieldSize      = new CIntField(type.getCIntegerField("_static_field_size"), Oop.getHeaderSize());
  90     staticOopFieldSize   = new CIntField(type.getCIntegerField("_static_oop_field_size"), Oop.getHeaderSize());
  91     nonstaticOopMapSize  = new CIntField(type.getCIntegerField("_nonstatic_oop_map_size"), Oop.getHeaderSize());

  92     isMarkedDependent    = new CIntField(type.getCIntegerField("_is_marked_dependent"), Oop.getHeaderSize());
  93     initState            = new CIntField(type.getCIntegerField("_init_state"), Oop.getHeaderSize());
  94     vtableLen            = new CIntField(type.getCIntegerField("_vtable_len"), Oop.getHeaderSize());
  95     itableLen            = new CIntField(type.getCIntegerField("_itable_len"), Oop.getHeaderSize());
  96     breakpoints          = type.getAddressField("_breakpoints");
  97     genericSignature     = new OopField(type.getOopField("_generic_signature"), Oop.getHeaderSize());
  98     majorVersion         = new CIntField(type.getCIntegerField("_major_version"), Oop.getHeaderSize());
  99     minorVersion         = new CIntField(type.getCIntegerField("_minor_version"), Oop.getHeaderSize());
 100     headerSize           = alignObjectOffset(Oop.getHeaderSize() + type.getSize());
 101 
 102     // read field offset constants
 103     ACCESS_FLAGS_OFFSET = db.lookupIntConstant("instanceKlass::access_flags_offset").intValue();
 104     NAME_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::name_index_offset").intValue();
 105     SIGNATURE_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::signature_index_offset").intValue();
 106     INITVAL_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::initval_index_offset").intValue();
 107     LOW_OFFSET = db.lookupIntConstant("instanceKlass::low_offset").intValue();
 108     HIGH_OFFSET = db.lookupIntConstant("instanceKlass::high_offset").intValue();
 109     GENERIC_SIGNATURE_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::generic_signature_offset").intValue();
 110     NEXT_OFFSET = db.lookupIntConstant("instanceKlass::next_offset").intValue();
 111     // read ClassState constants


 124   }
 125 
 126   private static OopField  arrayKlasses;
 127   private static OopField  methods;
 128   private static OopField  methodOrdering;
 129   private static OopField  localInterfaces;
 130   private static OopField  transitiveInterfaces;
 131   private static CIntField nofImplementors;
 132   private static OopField[] implementors;
 133   private static OopField  fields;
 134   private static OopField  constants;
 135   private static OopField  classLoader;
 136   private static OopField  protectionDomain;
 137   private static OopField  signers;
 138   private static OopField  sourceFileName;
 139   private static OopField  sourceDebugExtension;
 140   private static OopField  innerClasses;
 141   private static CIntField nonstaticFieldSize;
 142   private static CIntField staticFieldSize;
 143   private static CIntField staticOopFieldSize;
 144   private static CIntField nonstaticOopMapSize;

 145   private static CIntField isMarkedDependent;
 146   private static CIntField initState;
 147   private static CIntField vtableLen;
 148   private static CIntField itableLen;
 149   private static AddressField breakpoints;
 150   private static OopField  genericSignature;
 151   private static CIntField majorVersion;
 152   private static CIntField minorVersion;
 153 
 154   // type safe enum for ClassState from instanceKlass.hpp
 155   public static class ClassState {
 156      public static final ClassState UNPARSABLE_BY_GC = new ClassState("unparsable_by_gc");
 157      public static final ClassState ALLOCATED    = new ClassState("allocated");
 158      public static final ClassState LOADED       = new ClassState("loaded");
 159      public static final ClassState LINKED       = new ClassState("linked");
 160      public static final ClassState BEING_INITIALIZED      = new ClassState("beingInitialized");
 161      public static final ClassState FULLY_INITIALIZED    = new ClassState("fullyInitialized");
 162      public static final ClassState INITIALIZATION_ERROR = new ClassState("initializationError");
 163 
 164      private ClassState(String value) {


 246   // Accessors for declared fields
 247   public Klass     getArrayKlasses()        { return (Klass)        arrayKlasses.getValue(this); }
 248   public ObjArray  getMethods()             { return (ObjArray)     methods.getValue(this); }
 249   public TypeArray getMethodOrdering()      { return (TypeArray)    methodOrdering.getValue(this); }
 250   public ObjArray  getLocalInterfaces()     { return (ObjArray)     localInterfaces.getValue(this); }
 251   public ObjArray  getTransitiveInterfaces() { return (ObjArray)     transitiveInterfaces.getValue(this); }
 252   public long      nofImplementors()        { return                nofImplementors.getValue(this); }
 253   public Klass     getImplementor()         { return (Klass)        implementors[0].getValue(this); }
 254   public Klass     getImplementor(int i)    { return (Klass)        implementors[i].getValue(this); }
 255   public TypeArray getFields()              { return (TypeArray)    fields.getValue(this); }
 256   public ConstantPool getConstants()        { return (ConstantPool) constants.getValue(this); }
 257   public Oop       getClassLoader()         { return                classLoader.getValue(this); }
 258   public Oop       getProtectionDomain()    { return                protectionDomain.getValue(this); }
 259   public ObjArray  getSigners()             { return (ObjArray)     signers.getValue(this); }
 260   public Symbol    getSourceFileName()      { return (Symbol)       sourceFileName.getValue(this); }
 261   public Symbol    getSourceDebugExtension(){ return (Symbol)       sourceDebugExtension.getValue(this); }
 262   public TypeArray getInnerClasses()        { return (TypeArray)    innerClasses.getValue(this); }
 263   public long      getNonstaticFieldSize()  { return                nonstaticFieldSize.getValue(this); }
 264   public long      getStaticFieldSize()     { return                staticFieldSize.getValue(this); }
 265   public long      getStaticOopFieldSize()  { return                staticOopFieldSize.getValue(this); }
 266   public long      getNonstaticOopMapSize() { return                nonstaticOopMapSize.getValue(this); }

 267   public boolean   getIsMarkedDependent()   { return                isMarkedDependent.getValue(this) != 0; }
 268   public long      getVtableLen()           { return                vtableLen.getValue(this); }
 269   public long      getItableLen()           { return                itableLen.getValue(this); }
 270   public Symbol    getGenericSignature()    { return (Symbol)       genericSignature.getValue(this); }
 271   public long      majorVersion()           { return                majorVersion.getValue(this); }
 272   public long      minorVersion()           { return                minorVersion.getValue(this); }
 273 
 274   // "size helper" == instance size in words
 275   public long getSizeHelper() {
 276     int lh = getLayoutHelper();
 277     if (Assert.ASSERTS_ENABLED) {
 278       Assert.that(lh > 0, "layout helper initialized for instance class");
 279     }

 280     return lh / VM.getVM().getAddressSize();
 281   }
 282 
 283   // same as enum InnerClassAttributeOffset in VM code.
 284   public static interface InnerClassAttributeOffset {
 285     // from JVM spec. "InnerClasses" attribute
 286     public static final int innerClassInnerClassInfoOffset = 0;
 287     public static final int innerClassOuterClassInfoOffset = 1;
 288     public static final int innerClassInnerNameOffset = 2;
 289     public static final int innerClassAccessFlagsOffset = 3;
 290     public static final int innerClassNextOffset = 4;
 291   };
 292 
 293   // refer to compute_modifier_flags in VM code.
 294   public long computeModifierFlags() {
 295     long access = getAccessFlags();
 296     // But check if it happens to be member class.
 297     TypeArray innerClassList = getInnerClasses();
 298     int length = ( innerClassList == null)? 0 : (int) innerClassList.getLength();
 299     if (length > 0) {


 438     super.iterateFields(visitor, doVMFields);
 439     if (doVMFields) {
 440       visitor.doOop(arrayKlasses, true);
 441       visitor.doOop(methods, true);
 442       visitor.doOop(methodOrdering, true);
 443       visitor.doOop(localInterfaces, true);
 444       visitor.doOop(transitiveInterfaces, true);
 445       visitor.doCInt(nofImplementors, true);
 446       for (int i = 0; i < IMPLEMENTORS_LIMIT; i++)
 447         visitor.doOop(implementors[i], true);
 448       visitor.doOop(fields, true);
 449       visitor.doOop(constants, true);
 450       visitor.doOop(classLoader, true);
 451       visitor.doOop(protectionDomain, true);
 452       visitor.doOop(signers, true);
 453       visitor.doOop(sourceFileName, true);
 454       visitor.doOop(innerClasses, true);
 455       visitor.doCInt(nonstaticFieldSize, true);
 456       visitor.doCInt(staticFieldSize, true);
 457       visitor.doCInt(staticOopFieldSize, true);
 458       visitor.doCInt(nonstaticOopMapSize, true);

 459       visitor.doCInt(isMarkedDependent, true);
 460       visitor.doCInt(initState, true);
 461       visitor.doCInt(vtableLen, true);
 462       visitor.doCInt(itableLen, true);
 463     }
 464 
 465     TypeArray fields = getFields();
 466     int length = (int) fields.getLength();
 467     for (int index = 0; index < length; index += NEXT_OFFSET) {
 468       short accessFlags    = fields.getShortAt(index + ACCESS_FLAGS_OFFSET);
 469       short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET);
 470       FieldType   type   = new FieldType((Symbol) getConstants().getObjAt(signatureIndex));
 471       AccessFlags access = new AccessFlags(accessFlags);
 472       if (access.isStatic()) {
 473         visitField(visitor, type, index);
 474       }
 475     }
 476   }
 477 
 478   public Klass getJavaSuper() {


 673 
 674     /** Return a List containing an SA InstanceKlass for each
 675         interface named in this class's 'implements' clause.
 676     */
 677     public List getDirectImplementedInterfaces() {
 678         // Contains an InstanceKlass for each interface in this classes
 679         // 'implements' clause.
 680 
 681         ObjArray interfaces = getLocalInterfaces();
 682         int length = (int) interfaces.getLength();
 683         List directImplementedInterfaces = new ArrayList(length);
 684 
 685         for (int index = 0; index < length; index ++) {
 686             directImplementedInterfaces.add(interfaces.getObjAt(index));
 687         }
 688 
 689         return directImplementedInterfaces;
 690     }
 691 
 692 
 693   public long getObjectSize() {
 694     long bodySize =    alignObjectOffset(getVtableLen() * getHeap().getOopSize())
 695                      + alignObjectOffset(getItableLen() * getHeap().getOopSize())
 696                      + (getStaticFieldSize() + getNonstaticOopMapSize()) * getHeap().getOopSize();
 697     return alignObjectSize(headerSize + bodySize);
 698   }
 699 
 700   public Klass arrayKlassImpl(boolean orNull, int n) {
 701     // FIXME: in reflective system this would need to change to
 702     // actually allocate
 703     if (getArrayKlasses() == null) { return null; }
 704     ObjArrayKlass oak = (ObjArrayKlass) getArrayKlasses();
 705     if (orNull) {
 706       return oak.arrayKlassOrNull(n);
 707     }
 708     return oak.arrayKlass(n);
 709   }
 710 
 711   public Klass arrayKlassImpl(boolean orNull) {
 712     return arrayKlassImpl(orNull, 1);
 713   }
 714 
 715   public String signature() {
 716      return "L" + super.signature() + ";";
 717   }
 718 
 719   /** Convenience routine taking Strings; lookup is done in




  71     localInterfaces      = new OopField(type.getOopField("_local_interfaces"), Oop.getHeaderSize());
  72     transitiveInterfaces = new OopField(type.getOopField("_transitive_interfaces"), Oop.getHeaderSize());
  73     nofImplementors      = new CIntField(type.getCIntegerField("_nof_implementors"), Oop.getHeaderSize());
  74     IMPLEMENTORS_LIMIT   = db.lookupIntConstant("instanceKlass::implementors_limit").intValue();
  75     implementors         = new OopField[IMPLEMENTORS_LIMIT];
  76     for (int i = 0; i < IMPLEMENTORS_LIMIT; i++) {
  77       long arrayOffset = Oop.getHeaderSize() + (i * db.getAddressSize());
  78       implementors[i]    = new OopField(type.getOopField("_implementors[0]"), arrayOffset);
  79     }
  80     fields               = new OopField(type.getOopField("_fields"), Oop.getHeaderSize());
  81     constants            = new OopField(type.getOopField("_constants"), Oop.getHeaderSize());
  82     classLoader          = new OopField(type.getOopField("_class_loader"), Oop.getHeaderSize());
  83     protectionDomain     = new OopField(type.getOopField("_protection_domain"), Oop.getHeaderSize());
  84     signers              = new OopField(type.getOopField("_signers"), Oop.getHeaderSize());
  85     sourceFileName       = new OopField(type.getOopField("_source_file_name"), Oop.getHeaderSize());
  86     sourceDebugExtension = new OopField(type.getOopField("_source_debug_extension"), Oop.getHeaderSize());
  87     innerClasses         = new OopField(type.getOopField("_inner_classes"), Oop.getHeaderSize());
  88     nonstaticFieldSize   = new CIntField(type.getCIntegerField("_nonstatic_field_size"), Oop.getHeaderSize());
  89     staticFieldSize      = new CIntField(type.getCIntegerField("_static_field_size"), Oop.getHeaderSize());
  90     staticOopFieldSize   = new CIntField(type.getCIntegerField("_static_oop_field_size"), Oop.getHeaderSize());
  91     mapOffsetInBytes     = new CIntField(type.getCIntegerField("_map_offset_in_bytes"), Oop.getHeaderSize());
  92     objectSize           = new CIntField(type.getCIntegerField("_object_size"), Oop.getHeaderSize());
  93     isMarkedDependent    = new CIntField(type.getCIntegerField("_is_marked_dependent"), Oop.getHeaderSize());
  94     initState            = new CIntField(type.getCIntegerField("_init_state"), Oop.getHeaderSize());
  95     vtableLen            = new CIntField(type.getCIntegerField("_vtable_len"), Oop.getHeaderSize());
  96     itableLen            = new CIntField(type.getCIntegerField("_itable_len"), Oop.getHeaderSize());
  97     breakpoints          = type.getAddressField("_breakpoints");
  98     genericSignature     = new OopField(type.getOopField("_generic_signature"), Oop.getHeaderSize());
  99     majorVersion         = new CIntField(type.getCIntegerField("_major_version"), Oop.getHeaderSize());
 100     minorVersion         = new CIntField(type.getCIntegerField("_minor_version"), Oop.getHeaderSize());
 101     headerSize           = alignObjectOffset(Oop.getHeaderSize() + type.getSize());
 102 
 103     // read field offset constants
 104     ACCESS_FLAGS_OFFSET = db.lookupIntConstant("instanceKlass::access_flags_offset").intValue();
 105     NAME_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::name_index_offset").intValue();
 106     SIGNATURE_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::signature_index_offset").intValue();
 107     INITVAL_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::initval_index_offset").intValue();
 108     LOW_OFFSET = db.lookupIntConstant("instanceKlass::low_offset").intValue();
 109     HIGH_OFFSET = db.lookupIntConstant("instanceKlass::high_offset").intValue();
 110     GENERIC_SIGNATURE_INDEX_OFFSET = db.lookupIntConstant("instanceKlass::generic_signature_offset").intValue();
 111     NEXT_OFFSET = db.lookupIntConstant("instanceKlass::next_offset").intValue();
 112     // read ClassState constants


 125   }
 126 
 127   private static OopField  arrayKlasses;
 128   private static OopField  methods;
 129   private static OopField  methodOrdering;
 130   private static OopField  localInterfaces;
 131   private static OopField  transitiveInterfaces;
 132   private static CIntField nofImplementors;
 133   private static OopField[] implementors;
 134   private static OopField  fields;
 135   private static OopField  constants;
 136   private static OopField  classLoader;
 137   private static OopField  protectionDomain;
 138   private static OopField  signers;
 139   private static OopField  sourceFileName;
 140   private static OopField  sourceDebugExtension;
 141   private static OopField  innerClasses;
 142   private static CIntField nonstaticFieldSize;
 143   private static CIntField staticFieldSize;
 144   private static CIntField staticOopFieldSize;
 145   private static CIntField mapOffsetInBytes;
 146   private static CIntField objectSize;
 147   private static CIntField isMarkedDependent;
 148   private static CIntField initState;
 149   private static CIntField vtableLen;
 150   private static CIntField itableLen;
 151   private static AddressField breakpoints;
 152   private static OopField  genericSignature;
 153   private static CIntField majorVersion;
 154   private static CIntField minorVersion;
 155 
 156   // type safe enum for ClassState from instanceKlass.hpp
 157   public static class ClassState {
 158      public static final ClassState UNPARSABLE_BY_GC = new ClassState("unparsable_by_gc");
 159      public static final ClassState ALLOCATED    = new ClassState("allocated");
 160      public static final ClassState LOADED       = new ClassState("loaded");
 161      public static final ClassState LINKED       = new ClassState("linked");
 162      public static final ClassState BEING_INITIALIZED      = new ClassState("beingInitialized");
 163      public static final ClassState FULLY_INITIALIZED    = new ClassState("fullyInitialized");
 164      public static final ClassState INITIALIZATION_ERROR = new ClassState("initializationError");
 165 
 166      private ClassState(String value) {


 248   // Accessors for declared fields
 249   public Klass     getArrayKlasses()        { return (Klass)        arrayKlasses.getValue(this); }
 250   public ObjArray  getMethods()             { return (ObjArray)     methods.getValue(this); }
 251   public TypeArray getMethodOrdering()      { return (TypeArray)    methodOrdering.getValue(this); }
 252   public ObjArray  getLocalInterfaces()     { return (ObjArray)     localInterfaces.getValue(this); }
 253   public ObjArray  getTransitiveInterfaces() { return (ObjArray)     transitiveInterfaces.getValue(this); }
 254   public long      nofImplementors()        { return                nofImplementors.getValue(this); }
 255   public Klass     getImplementor()         { return (Klass)        implementors[0].getValue(this); }
 256   public Klass     getImplementor(int i)    { return (Klass)        implementors[i].getValue(this); }
 257   public TypeArray getFields()              { return (TypeArray)    fields.getValue(this); }
 258   public ConstantPool getConstants()        { return (ConstantPool) constants.getValue(this); }
 259   public Oop       getClassLoader()         { return                classLoader.getValue(this); }
 260   public Oop       getProtectionDomain()    { return                protectionDomain.getValue(this); }
 261   public ObjArray  getSigners()             { return (ObjArray)     signers.getValue(this); }
 262   public Symbol    getSourceFileName()      { return (Symbol)       sourceFileName.getValue(this); }
 263   public Symbol    getSourceDebugExtension(){ return (Symbol)       sourceDebugExtension.getValue(this); }
 264   public TypeArray getInnerClasses()        { return (TypeArray)    innerClasses.getValue(this); }
 265   public long      getNonstaticFieldSize()  { return                nonstaticFieldSize.getValue(this); }
 266   public long      getStaticFieldSize()     { return                staticFieldSize.getValue(this); }
 267   public long      getStaticOopFieldSize()  { return                staticOopFieldSize.getValue(this); }
 268   public long      getMapOffsetInBytes()    { return                mapOffsetInBytes.getValue(this); }
 269   public long      objectSize()             { return                objectSize.getValue(this); }
 270   public boolean   getIsMarkedDependent()   { return                isMarkedDependent.getValue(this) != 0; }
 271   public long      getVtableLen()           { return                vtableLen.getValue(this); }
 272   public long      getItableLen()           { return                itableLen.getValue(this); }
 273   public Symbol    getGenericSignature()    { return (Symbol)       genericSignature.getValue(this); }
 274   public long      majorVersion()           { return                majorVersion.getValue(this); }
 275   public long      minorVersion()           { return                minorVersion.getValue(this); }
 276 
 277   // "size helper" == instance size in words
 278   public long getSizeHelper() {
 279     int lh = getLayoutHelper();
 280     if (Assert.ASSERTS_ENABLED) {
 281       Assert.that(isFixedInstance(), "layout helper initialized for instance class");
 282     }
 283     lh = Bits.maskBits(lh, ~Bits.rightNBits(LH_SIZE_LOW_BITS));
 284     return lh / VM.getVM().getAddressSize();
 285   }
 286 
 287   // same as enum InnerClassAttributeOffset in VM code.
 288   public static interface InnerClassAttributeOffset {
 289     // from JVM spec. "InnerClasses" attribute
 290     public static final int innerClassInnerClassInfoOffset = 0;
 291     public static final int innerClassOuterClassInfoOffset = 1;
 292     public static final int innerClassInnerNameOffset = 2;
 293     public static final int innerClassAccessFlagsOffset = 3;
 294     public static final int innerClassNextOffset = 4;
 295   };
 296 
 297   // refer to compute_modifier_flags in VM code.
 298   public long computeModifierFlags() {
 299     long access = getAccessFlags();
 300     // But check if it happens to be member class.
 301     TypeArray innerClassList = getInnerClasses();
 302     int length = ( innerClassList == null)? 0 : (int) innerClassList.getLength();
 303     if (length > 0) {


 442     super.iterateFields(visitor, doVMFields);
 443     if (doVMFields) {
 444       visitor.doOop(arrayKlasses, true);
 445       visitor.doOop(methods, true);
 446       visitor.doOop(methodOrdering, true);
 447       visitor.doOop(localInterfaces, true);
 448       visitor.doOop(transitiveInterfaces, true);
 449       visitor.doCInt(nofImplementors, true);
 450       for (int i = 0; i < IMPLEMENTORS_LIMIT; i++)
 451         visitor.doOop(implementors[i], true);
 452       visitor.doOop(fields, true);
 453       visitor.doOop(constants, true);
 454       visitor.doOop(classLoader, true);
 455       visitor.doOop(protectionDomain, true);
 456       visitor.doOop(signers, true);
 457       visitor.doOop(sourceFileName, true);
 458       visitor.doOop(innerClasses, true);
 459       visitor.doCInt(nonstaticFieldSize, true);
 460       visitor.doCInt(staticFieldSize, true);
 461       visitor.doCInt(staticOopFieldSize, true);
 462       visitor.doCInt(mapOffsetInBytes, true);
 463       visitor.doCInt(objectSize, true);
 464       visitor.doCInt(isMarkedDependent, true);
 465       visitor.doCInt(initState, true);
 466       visitor.doCInt(vtableLen, true);
 467       visitor.doCInt(itableLen, true);
 468     }
 469 
 470     TypeArray fields = getFields();
 471     int length = (int) fields.getLength();
 472     for (int index = 0; index < length; index += NEXT_OFFSET) {
 473       short accessFlags    = fields.getShortAt(index + ACCESS_FLAGS_OFFSET);
 474       short signatureIndex = fields.getShortAt(index + SIGNATURE_INDEX_OFFSET);
 475       FieldType   type   = new FieldType((Symbol) getConstants().getObjAt(signatureIndex));
 476       AccessFlags access = new AccessFlags(accessFlags);
 477       if (access.isStatic()) {
 478         visitField(visitor, type, index);
 479       }
 480     }
 481   }
 482 
 483   public Klass getJavaSuper() {


 678 
 679     /** Return a List containing an SA InstanceKlass for each
 680         interface named in this class's 'implements' clause.
 681     */
 682     public List getDirectImplementedInterfaces() {
 683         // Contains an InstanceKlass for each interface in this classes
 684         // 'implements' clause.
 685 
 686         ObjArray interfaces = getLocalInterfaces();
 687         int length = (int) interfaces.getLength();
 688         List directImplementedInterfaces = new ArrayList(length);
 689 
 690         for (int index = 0; index < length; index ++) {
 691             directImplementedInterfaces.add(interfaces.getObjAt(index));
 692         }
 693 
 694         return directImplementedInterfaces;
 695     }
 696 
 697 







 698   public Klass arrayKlassImpl(boolean orNull, int n) {
 699     // FIXME: in reflective system this would need to change to
 700     // actually allocate
 701     if (getArrayKlasses() == null) { return null; }
 702     ObjArrayKlass oak = (ObjArrayKlass) getArrayKlasses();
 703     if (orNull) {
 704       return oak.arrayKlassOrNull(n);
 705     }
 706     return oak.arrayKlass(n);
 707   }
 708 
 709   public Klass arrayKlassImpl(boolean orNull) {
 710     return arrayKlassImpl(orNull, 1);
 711   }
 712 
 713   public String signature() {
 714      return "L" + super.signature() + ";";
 715   }
 716 
 717   /** Convenience routine taking Strings; lookup is done in