< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page


 312   // embedded static fields follows here
 313   // embedded nonstatic oop-map blocks follows here
 314   // embedded implementor of this interface follows here
 315   //   The embedded implementor only exists if the current klass is an
 316   //   iterface. The possible values of the implementor fall into following
 317   //   three cases:
 318   //     NULL: no implementor.
 319   //     A Klass* that's not itself: one implementor.
 320   //     Itself: more than one implementors.
 321   // embedded unsafe_anonymous_host klass follows here
 322   //   The embedded host klass only exists in an unsafe anonymous class for
 323   //   dynamic language support (JSR 292 enabled). The host class grants
 324   //   its access privileges to this class also. The host class is either
 325   //   named, or a previously loaded unsafe anonymous class. A non-anonymous class
 326   //   or an anonymous class loaded through normal classloading does not
 327   //   have this embedded field.
 328   //
 329 
 330   friend class SystemDictionary;
 331 


 332  public:
 333   u2 loader_type() {
 334     return _misc_flags & loader_type_bits();
 335   }
 336 
 337   bool is_shared_boot_class() const {
 338     return (_misc_flags & _misc_is_shared_boot_class) != 0;
 339   }
 340   bool is_shared_platform_class() const {
 341     return (_misc_flags & _misc_is_shared_platform_class) != 0;
 342   }
 343   bool is_shared_app_class() const {
 344     return (_misc_flags & _misc_is_shared_app_class) != 0;
 345   }
 346 
 347   void clear_class_loader_type() {
 348     _misc_flags &= ~loader_type_bits();
 349   }
 350 
 351   void set_class_loader_type(s2 loader_type);


 546   void set_this_class_index(u2 index)     { _this_class_index = index; }
 547 
 548   static ByteSize reference_type_offset() { return in_ByteSize(offset_of(InstanceKlass, _reference_type)); }
 549 
 550   // find local field, returns true if found
 551   bool find_local_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 552   // find field in direct superinterfaces, returns the interface in which the field is defined
 553   Klass* find_interface_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 554   // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
 555   Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 556   // find instance or static fields according to JVM spec 5.4.3.2, returns the klass in which the field is defined
 557   Klass* find_field(Symbol* name, Symbol* sig, bool is_static, fieldDescriptor* fd) const;
 558 
 559   // find a non-static or static field given its offset within the class.
 560   bool contains_field_offset(int offset) {
 561     return instanceOopDesc::contains_field_offset(offset, nonstatic_field_size());
 562   }
 563 
 564   bool find_local_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;
 565   bool find_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;








 566 
 567   // find a local method (returns NULL if not found)
 568   Method* find_method(const Symbol* name, const Symbol* signature) const;
 569   static Method* find_method(const Array<Method*>* methods,
 570                              const Symbol* name,
 571                              const Symbol* signature);
 572 
 573   // find a local method, but skip static methods
 574   Method* find_instance_method(const Symbol* name, const Symbol* signature,
 575                                PrivateLookupMode private_mode = find_private) const;
 576   static Method* find_instance_method(const Array<Method*>* methods,
 577                                       const Symbol* name,
 578                                       const Symbol* signature,
 579                                       PrivateLookupMode private_mode = find_private);
 580 
 581   // find a local method (returns NULL if not found)
 582   Method* find_local_method(const Symbol* name,
 583                             const Symbol* signature,
 584                             OverpassLookupMode overpass_mode,
 585                             StaticLookupMode static_mode,




 312   // embedded static fields follows here
 313   // embedded nonstatic oop-map blocks follows here
 314   // embedded implementor of this interface follows here
 315   //   The embedded implementor only exists if the current klass is an
 316   //   iterface. The possible values of the implementor fall into following
 317   //   three cases:
 318   //     NULL: no implementor.
 319   //     A Klass* that's not itself: one implementor.
 320   //     Itself: more than one implementors.
 321   // embedded unsafe_anonymous_host klass follows here
 322   //   The embedded host klass only exists in an unsafe anonymous class for
 323   //   dynamic language support (JSR 292 enabled). The host class grants
 324   //   its access privileges to this class also. The host class is either
 325   //   named, or a previously loaded unsafe anonymous class. A non-anonymous class
 326   //   or an anonymous class loaded through normal classloading does not
 327   //   have this embedded field.
 328   //
 329 
 330   friend class SystemDictionary;
 331 
 332   static bool _disable_method_binary_search;
 333 
 334  public:
 335   u2 loader_type() {
 336     return _misc_flags & loader_type_bits();
 337   }
 338 
 339   bool is_shared_boot_class() const {
 340     return (_misc_flags & _misc_is_shared_boot_class) != 0;
 341   }
 342   bool is_shared_platform_class() const {
 343     return (_misc_flags & _misc_is_shared_platform_class) != 0;
 344   }
 345   bool is_shared_app_class() const {
 346     return (_misc_flags & _misc_is_shared_app_class) != 0;
 347   }
 348 
 349   void clear_class_loader_type() {
 350     _misc_flags &= ~loader_type_bits();
 351   }
 352 
 353   void set_class_loader_type(s2 loader_type);


 548   void set_this_class_index(u2 index)     { _this_class_index = index; }
 549 
 550   static ByteSize reference_type_offset() { return in_ByteSize(offset_of(InstanceKlass, _reference_type)); }
 551 
 552   // find local field, returns true if found
 553   bool find_local_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 554   // find field in direct superinterfaces, returns the interface in which the field is defined
 555   Klass* find_interface_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 556   // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
 557   Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 558   // find instance or static fields according to JVM spec 5.4.3.2, returns the klass in which the field is defined
 559   Klass* find_field(Symbol* name, Symbol* sig, bool is_static, fieldDescriptor* fd) const;
 560 
 561   // find a non-static or static field given its offset within the class.
 562   bool contains_field_offset(int offset) {
 563     return instanceOopDesc::contains_field_offset(offset, nonstatic_field_size());
 564   }
 565 
 566   bool find_local_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;
 567   bool find_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;
 568 
 569  private:
 570   static int quick_search(const Array<Method*>* methods, const Symbol* name);
 571 
 572  public:
 573   static void disable_method_binary_search() {
 574     _disable_method_binary_search = true;
 575   }
 576 
 577   // find a local method (returns NULL if not found)
 578   Method* find_method(const Symbol* name, const Symbol* signature) const;
 579   static Method* find_method(const Array<Method*>* methods,
 580                              const Symbol* name,
 581                              const Symbol* signature);
 582 
 583   // find a local method, but skip static methods
 584   Method* find_instance_method(const Symbol* name, const Symbol* signature,
 585                                PrivateLookupMode private_mode = find_private) const;
 586   static Method* find_instance_method(const Array<Method*>* methods,
 587                                       const Symbol* name,
 588                                       const Symbol* signature,
 589                                       PrivateLookupMode private_mode = find_private);
 590 
 591   // find a local method (returns NULL if not found)
 592   Method* find_local_method(const Symbol* name,
 593                             const Symbol* signature,
 594                             OverpassLookupMode overpass_mode,
 595                             StaticLookupMode static_mode,


< prev index next >