< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page




 153   Klass* volatile _array_klasses;
 154   // Constant pool for this class.
 155   ConstantPool* _constants;
 156   // The InnerClasses attribute and EnclosingMethod attribute. The
 157   // _inner_classes is an array of shorts. If the class has InnerClasses
 158   // attribute, then the _inner_classes array begins with 4-tuples of shorts
 159   // [inner_class_info_index, outer_class_info_index,
 160   // inner_name_index, inner_class_access_flags] for the InnerClasses
 161   // attribute. If the EnclosingMethod attribute exists, it occupies the
 162   // last two shorts [class_index, method_index] of the array. If only
 163   // the InnerClasses attribute exists, the _inner_classes array length is
 164   // number_of_inner_classes * 4. If the class has both InnerClasses
 165   // and EnclosingMethod attributes the _inner_classes array length is
 166   // number_of_inner_classes * 4 + enclosing_method_attribute_size.
 167   Array<jushort>* _inner_classes;
 168 
 169   // The NestMembers attribute. An array of shorts, where each is a
 170   // class info index for the class that is a nest member
 171   Array<jushort>* _nest_members;
 172 
 173   // The MemberOfNest attribute. The class info index for the class
 174   // that is the nest-top of this class
 175   jushort _nest_top_index;
 176 
 177   // Resolved nest-top klass: either true nest-top or self if we are not nested.
 178   // By always being set it makes nest-member access checks simpler.
 179   InstanceKlass* _nest_top;
 180 
 181   // the source debug extension for this klass, NULL if not specified.
 182   // Specified as UTF-8 string without terminating zero byte in the classfile,
 183   // it is stored in the instanceklass as a NULL-terminated UTF-8 string
 184   const char*     _source_debug_extension;
 185   // Array name derived from this class which needs unreferencing
 186   // if this class is unloaded.
 187   Symbol*         _array_name;
 188 
 189   // Number of heapOopSize words used by non-static fields in this klass
 190   // (including inherited fields but after header_size()).
 191   int             _nonstatic_field_size;
 192   int             _static_field_size;    // number words used by static fields (oop and non-oop) in this klass
 193   // Constant pool index to the utf8 entry of the Generic signature,
 194   // or 0 if none.
 195   u2              _generic_signature_index;
 196   // Constant pool index to the utf8 entry for the name of source file
 197   // containing this klass, 0 if not specified.
 198   u2              _source_file_name_index;
 199   u2              _static_oop_field_count;// number of static oop fields in this klass


 430   Symbol* field_signature   (int index) const { return field(index)->signature(constants()); }
 431 
 432   // Number of Java declared fields
 433   int java_fields_count() const           { return (int)_java_fields_count; }
 434 
 435   Array<u2>* fields() const            { return _fields; }
 436   void set_fields(Array<u2>* f, u2 java_fields_count) {
 437     guarantee(_fields == NULL || f == NULL, "Just checking");
 438     _fields = f;
 439     _java_fields_count = java_fields_count;
 440   }
 441 
 442   // inner classes
 443   Array<u2>* inner_classes() const       { return _inner_classes; }
 444   void set_inner_classes(Array<u2>* f)   { _inner_classes = f; }
 445 
 446   // nest members
 447   Array<u2>* nest_members() const     { return _nest_members; }
 448   void set_nest_members(Array<u2>* m) { _nest_members = m; }
 449 
 450   // nest-top index
 451   jushort nest_top_index() const { return _nest_top_index; }
 452   void set_nest_top_index(u2 i)  { _nest_top_index = i; }
 453 
 454   // Returns nest-top class, resolving and validating it if needed
 455   // Returns NULL if an exception occurs during loading, or validation fails
 456   InstanceKlass* nest_top(TRAPS);
 457   InstanceKlass* raw_nest_top() { return _nest_top; } // debugging
 458 
 459   // Called to verify that k is a member of this nest - does not look at k's nest-top
 460   bool has_nest_member(InstanceKlass* k, TRAPS) const;
 461   // Check if this klass is a nestmate of k
 462   bool has_nestmate_access_to(InstanceKlass* k, TRAPS);
 463 
 464   enum InnerClassAttributeOffset {
 465     // From http://mirror.eng/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc10.html#18814
 466     inner_class_inner_class_info_offset = 0,
 467     inner_class_outer_class_info_offset = 1,
 468     inner_class_inner_name_offset = 2,
 469     inner_class_access_flags_offset = 3,
 470     inner_class_next_offset = 4
 471   };
 472 
 473   enum EnclosingMethodAttributeOffset {
 474     enclosing_method_class_index_offset = 0,
 475     enclosing_method_method_index_offset = 1,
 476     enclosing_method_attribute_size = 2
 477   };
 478 
 479   // method override check




 153   Klass* volatile _array_klasses;
 154   // Constant pool for this class.
 155   ConstantPool* _constants;
 156   // The InnerClasses attribute and EnclosingMethod attribute. The
 157   // _inner_classes is an array of shorts. If the class has InnerClasses
 158   // attribute, then the _inner_classes array begins with 4-tuples of shorts
 159   // [inner_class_info_index, outer_class_info_index,
 160   // inner_name_index, inner_class_access_flags] for the InnerClasses
 161   // attribute. If the EnclosingMethod attribute exists, it occupies the
 162   // last two shorts [class_index, method_index] of the array. If only
 163   // the InnerClasses attribute exists, the _inner_classes array length is
 164   // number_of_inner_classes * 4. If the class has both InnerClasses
 165   // and EnclosingMethod attributes the _inner_classes array length is
 166   // number_of_inner_classes * 4 + enclosing_method_attribute_size.
 167   Array<jushort>* _inner_classes;
 168 
 169   // The NestMembers attribute. An array of shorts, where each is a
 170   // class info index for the class that is a nest member
 171   Array<jushort>* _nest_members;
 172 
 173   // The NestHost attribute. The class info index for the class
 174   // that is the nest-host of this class
 175   jushort _nest_host_index;
 176 
 177   // Resolved nest-host klass: either true nest-host or self if we are not nested.
 178   // By always being set it makes nest-member access checks simpler.
 179   InstanceKlass* _nest_host;
 180 
 181   // the source debug extension for this klass, NULL if not specified.
 182   // Specified as UTF-8 string without terminating zero byte in the classfile,
 183   // it is stored in the instanceklass as a NULL-terminated UTF-8 string
 184   const char*     _source_debug_extension;
 185   // Array name derived from this class which needs unreferencing
 186   // if this class is unloaded.
 187   Symbol*         _array_name;
 188 
 189   // Number of heapOopSize words used by non-static fields in this klass
 190   // (including inherited fields but after header_size()).
 191   int             _nonstatic_field_size;
 192   int             _static_field_size;    // number words used by static fields (oop and non-oop) in this klass
 193   // Constant pool index to the utf8 entry of the Generic signature,
 194   // or 0 if none.
 195   u2              _generic_signature_index;
 196   // Constant pool index to the utf8 entry for the name of source file
 197   // containing this klass, 0 if not specified.
 198   u2              _source_file_name_index;
 199   u2              _static_oop_field_count;// number of static oop fields in this klass


 430   Symbol* field_signature   (int index) const { return field(index)->signature(constants()); }
 431 
 432   // Number of Java declared fields
 433   int java_fields_count() const           { return (int)_java_fields_count; }
 434 
 435   Array<u2>* fields() const            { return _fields; }
 436   void set_fields(Array<u2>* f, u2 java_fields_count) {
 437     guarantee(_fields == NULL || f == NULL, "Just checking");
 438     _fields = f;
 439     _java_fields_count = java_fields_count;
 440   }
 441 
 442   // inner classes
 443   Array<u2>* inner_classes() const       { return _inner_classes; }
 444   void set_inner_classes(Array<u2>* f)   { _inner_classes = f; }
 445 
 446   // nest members
 447   Array<u2>* nest_members() const     { return _nest_members; }
 448   void set_nest_members(Array<u2>* m) { _nest_members = m; }
 449 
 450   // nest-host index
 451   jushort nest_host_index() const { return _nest_host_index; }
 452   void set_nest_host_index(u2 i)  { _nest_host_index = i; }
 453 
 454   // Returns nest-host class, resolving and validating it if needed
 455   // Returns NULL if an exception occurs during loading, or validation fails
 456   InstanceKlass* nest_host(TRAPS);
 457   InstanceKlass* raw_nest_host() { return _nest_host; } // debugging
 458 
 459   // Called to verify that k is a member of this nest - does not look at k's nest-host
 460   bool has_nest_member(InstanceKlass* k, TRAPS) const;
 461   // Check if this klass is a nestmate of k
 462   bool has_nestmate_access_to(InstanceKlass* k, TRAPS);
 463 
 464   enum InnerClassAttributeOffset {
 465     // From http://mirror.eng/products/jdk/1.1/docs/guide/innerclasses/spec/innerclasses.doc10.html#18814
 466     inner_class_inner_class_info_offset = 0,
 467     inner_class_outer_class_info_offset = 1,
 468     inner_class_inner_name_offset = 2,
 469     inner_class_access_flags_offset = 3,
 470     inner_class_next_offset = 4
 471   };
 472 
 473   enum EnclosingMethodAttributeOffset {
 474     enclosing_method_class_index_offset = 0,
 475     enclosing_method_method_index_offset = 1,
 476     enclosing_method_attribute_size = 2
 477   };
 478 
 479   // method override check


< prev index next >