src/share/vm/oops/instanceKlass.hpp

Print this page




 486   Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 487   // find instance or static fields according to JVM spec 5.4.3.2, returns the klass in which the field is defined
 488   Klass* find_field(Symbol* name, Symbol* sig, bool is_static, fieldDescriptor* fd) const;
 489 
 490   // find a non-static or static field given its offset within the class.
 491   bool contains_field_offset(int offset) {
 492     return instanceOopDesc::contains_field_offset(offset, nonstatic_field_size());
 493   }
 494 
 495   bool find_local_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;
 496   bool find_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;
 497 
 498   // find a local method (returns NULL if not found)
 499   Method* find_method(Symbol* name, Symbol* signature) const;
 500   static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature);
 501 
 502   // find a local method, but skip static methods
 503   Method* find_instance_method(Symbol* name, Symbol* signature);
 504   static Method* find_instance_method(Array<Method*>* methods, Symbol* name, Symbol* signature);
 505 













 506   // true if method matches signature and conforms to skipping_X conditions.
 507   static bool method_matches(Method* m, Symbol* signature, bool skipping_overpass, bool skipping_static);
 508 
 509   // find a local method index in default_methods (returns -1 if not found)
 510   static int find_method_index(Array<Method*>* methods, Symbol* name, Symbol* signature,
 511                                OverpassLookupMode overpass_mode, StaticLookupMode static_mode);



 512 
 513   // lookup operation (returns NULL if not found)
 514   Method* uncached_lookup_method(Symbol* name, Symbol* signature, OverpassLookupMode overpass_mode) const;
 515 
 516   // lookup a method in all the interfaces that this class implements
 517   // (returns NULL if not found)
 518   Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature, DefaultsLookupMode defaults_mode) const;
 519 
 520   // lookup a method in local defaults then in all interfaces
 521   // (returns NULL if not found)
 522   Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const;
 523 
 524   // Find method indices by name.  If a method with the specified name is
 525   // found the index to the first method is returned, and 'end' is filled in
 526   // with the index of first non-name-matching method.  If no method is found
 527   // -1 is returned.
 528   int find_method_by_name(Symbol* name, int* end);
 529   static int find_method_by_name(Array<Method*>* methods, Symbol* name, int* end);
 530 
 531   // constant pool


1136   static bool link_class_impl                           (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
1137   static bool verify_code                               (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
1138   static void initialize_impl                           (instanceKlassHandle this_k, TRAPS);
1139   static void initialize_super_interfaces               (instanceKlassHandle this_k, TRAPS);
1140   static void eager_initialize_impl                     (instanceKlassHandle this_k);
1141   static void set_initialization_state_and_notify_impl  (instanceKlassHandle this_k, ClassState state, TRAPS);
1142   static void call_class_initializer_impl               (instanceKlassHandle this_k, TRAPS);
1143   static Klass* array_klass_impl                        (instanceKlassHandle this_k, bool or_null, int n, TRAPS);
1144   static void do_local_static_fields_impl               (instanceKlassHandle this_k, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS);
1145   /* jni_id_for_impl for jfieldID only */
1146   static JNIid* jni_id_for_impl                         (instanceKlassHandle this_k, int offset);
1147 
1148   // Returns the array class for the n'th dimension
1149   Klass* array_klass_impl(bool or_null, int n, TRAPS);
1150 
1151   // Returns the array class with this class as element type
1152   Klass* array_klass_impl(bool or_null, TRAPS);
1153 
1154   // find a local method (returns NULL if not found)
1155   Method* find_method_impl(Symbol* name, Symbol* signature,
1156                            OverpassLookupMode overpass_mode, StaticLookupMode static_mode) const;
1157   static Method* find_method_impl(Array<Method*>* methods, Symbol* name, Symbol* signature,
1158                                   OverpassLookupMode overpass_mode, StaticLookupMode static_mode);





1159 
1160   // Free CHeap allocated fields.
1161   void release_C_heap_structures();
1162 
1163   // RedefineClasses support
1164   void link_previous_versions(InstanceKlass* pv) { _previous_versions = pv; }
1165   void mark_newly_obsolete_methods(Array<Method*>* old_methods, int emcp_method_count);
1166 public:
1167   // CDS support - remove and restore oops from metadata. Oops are not shared.
1168   virtual void remove_unshareable_info();
1169   virtual void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
1170 
1171   // jvm support
1172   jint compute_modifier_flags(TRAPS) const;
1173 
1174   // JSR-292 support
1175   MemberNameTable* member_names() { return _member_names; }
1176   void set_member_names(MemberNameTable* member_names) { _member_names = member_names; }
1177   bool add_member_name(Handle member_name);
1178 




 486   Klass* find_field(Symbol* name, Symbol* sig, fieldDescriptor* fd) const;
 487   // find instance or static fields according to JVM spec 5.4.3.2, returns the klass in which the field is defined
 488   Klass* find_field(Symbol* name, Symbol* sig, bool is_static, fieldDescriptor* fd) const;
 489 
 490   // find a non-static or static field given its offset within the class.
 491   bool contains_field_offset(int offset) {
 492     return instanceOopDesc::contains_field_offset(offset, nonstatic_field_size());
 493   }
 494 
 495   bool find_local_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;
 496   bool find_field_from_offset(int offset, bool is_static, fieldDescriptor* fd) const;
 497 
 498   // find a local method (returns NULL if not found)
 499   Method* find_method(Symbol* name, Symbol* signature) const;
 500   static Method* find_method(Array<Method*>* methods, Symbol* name, Symbol* signature);
 501 
 502   // find a local method, but skip static methods
 503   Method* find_instance_method(Symbol* name, Symbol* signature);
 504   static Method* find_instance_method(Array<Method*>* methods, Symbol* name, Symbol* signature);
 505 
 506   // find a local method (returns NULL if not found)
 507   Method* find_local_method(Symbol* name, Symbol* signature,
 508                            OverpassLookupMode overpass_mode, 
 509                            StaticLookupMode static_mode,
 510                            PrivateLookupMode private_mode) const;
 511 
 512   // find a local method from given methods array (returns NULL if not found)
 513   static Method* find_local_method(Array<Method*>* methods, 
 514                            Symbol* name, Symbol* signature,
 515                            OverpassLookupMode overpass_mode, 
 516                            StaticLookupMode static_mode,
 517                            PrivateLookupMode private_mode); 
 518 
 519   // true if method matches signature and conforms to skipping_X conditions.
 520   static bool method_matches(Method* m, Symbol* signature, bool skipping_overpass, bool skipping_static, bool skipping_private);
 521 
 522   // find a local method index in methods or default_methods (returns -1 if not found)
 523   static int find_method_index(Array<Method*>* methods, 
 524                                Symbol* name, Symbol* signature,
 525                                OverpassLookupMode overpass_mode, 
 526                                StaticLookupMode static_mode,
 527                                PrivateLookupMode private_mode);
 528 
 529   // lookup operation (returns NULL if not found)
 530   Method* uncached_lookup_method(Symbol* name, Symbol* signature, OverpassLookupMode overpass_mode) const;
 531 
 532   // lookup a method in all the interfaces that this class implements
 533   // (returns NULL if not found)
 534   Method* lookup_method_in_all_interfaces(Symbol* name, Symbol* signature, DefaultsLookupMode defaults_mode) const;
 535 
 536   // lookup a method in local defaults then in all interfaces
 537   // (returns NULL if not found)
 538   Method* lookup_method_in_ordered_interfaces(Symbol* name, Symbol* signature) const;
 539 
 540   // Find method indices by name.  If a method with the specified name is
 541   // found the index to the first method is returned, and 'end' is filled in
 542   // with the index of first non-name-matching method.  If no method is found
 543   // -1 is returned.
 544   int find_method_by_name(Symbol* name, int* end);
 545   static int find_method_by_name(Array<Method*>* methods, Symbol* name, int* end);
 546 
 547   // constant pool


1152   static bool link_class_impl                           (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
1153   static bool verify_code                               (instanceKlassHandle this_k, bool throw_verifyerror, TRAPS);
1154   static void initialize_impl                           (instanceKlassHandle this_k, TRAPS);
1155   static void initialize_super_interfaces               (instanceKlassHandle this_k, TRAPS);
1156   static void eager_initialize_impl                     (instanceKlassHandle this_k);
1157   static void set_initialization_state_and_notify_impl  (instanceKlassHandle this_k, ClassState state, TRAPS);
1158   static void call_class_initializer_impl               (instanceKlassHandle this_k, TRAPS);
1159   static Klass* array_klass_impl                        (instanceKlassHandle this_k, bool or_null, int n, TRAPS);
1160   static void do_local_static_fields_impl               (instanceKlassHandle this_k, void f(fieldDescriptor* fd, Handle, TRAPS), Handle, TRAPS);
1161   /* jni_id_for_impl for jfieldID only */
1162   static JNIid* jni_id_for_impl                         (instanceKlassHandle this_k, int offset);
1163 
1164   // Returns the array class for the n'th dimension
1165   Klass* array_klass_impl(bool or_null, int n, TRAPS);
1166 
1167   // Returns the array class with this class as element type
1168   Klass* array_klass_impl(bool or_null, TRAPS);
1169 
1170   // find a local method (returns NULL if not found)
1171   Method* find_method_impl(Symbol* name, Symbol* signature,
1172                            OverpassLookupMode overpass_mode, 
1173                            StaticLookupMode static_mode, 
1174                            PrivateLookupMode private_mode) const;
1175   static Method* find_method_impl(Array<Method*>* methods, 
1176                                   Symbol* name, Symbol* signature,
1177                                   OverpassLookupMode overpass_mode, 
1178                                   StaticLookupMode static_mode, 
1179                                   PrivateLookupMode private_mode);
1180 
1181   // Free CHeap allocated fields.
1182   void release_C_heap_structures();
1183 
1184   // RedefineClasses support
1185   void link_previous_versions(InstanceKlass* pv) { _previous_versions = pv; }
1186   void mark_newly_obsolete_methods(Array<Method*>* old_methods, int emcp_method_count);
1187 public:
1188   // CDS support - remove and restore oops from metadata. Oops are not shared.
1189   virtual void remove_unshareable_info();
1190   virtual void restore_unshareable_info(ClassLoaderData* loader_data, Handle protection_domain, TRAPS);
1191 
1192   // jvm support
1193   jint compute_modifier_flags(TRAPS) const;
1194 
1195   // JSR-292 support
1196   MemberNameTable* member_names() { return _member_names; }
1197   void set_member_names(MemberNameTable* member_names) { _member_names = member_names; }
1198   bool add_member_name(Handle member_name);
1199