@@ -313,8 +313,8 @@ class InstanceKlass: public Klass {
313313
314314 bool is_public () const { return _access_flags.is_public (); }
315315 bool is_final () const { return _access_flags.is_final (); }
316- bool is_interface () const { return _access_flags.is_interface (); }
317- bool is_abstract () const { return _access_flags.is_abstract (); }
316+ bool is_interface () const override { return _access_flags.is_interface (); }
317+ bool is_abstract () const override { return _access_flags.is_abstract (); }
318318 bool is_super () const { return _access_flags.is_super (); }
319319 bool is_synthetic () const { return _access_flags.is_synthetic (); }
320320 void set_is_synthetic () { _access_flags.set_is_synthetic (); }
@@ -494,8 +494,8 @@ class InstanceKlass: public Klass {
494494 };
495495
496496 // package
497- PackageEntry* package () const { return _package_entry; }
498- ModuleEntry* module () const ;
497+ PackageEntry* package () const override { return _package_entry; }
498+ ModuleEntry* module () const override ;
499499 bool in_javabase_module () const ;
500500 bool in_unnamed_package () const { return (_package_entry == nullptr ); }
501501 void set_package (ClassLoaderData* loader_data, PackageEntry* pkg_entry, TRAPS);
@@ -552,11 +552,11 @@ class InstanceKlass: public Klass {
552552 void set_is_marked_dependent (bool value) { _misc_flags.set_is_marked_dependent (value); }
553553
554554 // initialization (virtuals from Klass)
555- bool should_be_initialized () const ; // means that initialize should be called
555+ bool should_be_initialized () const override ; // means that initialize should be called
556556 void initialize_with_aot_initialized_mirror (TRAPS);
557557 void assert_no_clinit_will_run_for_aot_initialized_class () const NOT_DEBUG_RETURN;
558- void initialize (TRAPS);
559- void initialize_preemptable (TRAPS);
558+ void initialize (TRAPS) override ;
559+ void initialize_preemptable (TRAPS) override ;
560560 void link_class (TRAPS);
561561 bool link_class_or_fail (TRAPS); // returns false on failure
562562 void rewrite_class (TRAPS);
@@ -578,7 +578,7 @@ class InstanceKlass: public Klass {
578578 // find field in direct superinterfaces, returns the interface in which the field is defined
579579 Klass* find_interface_field (Symbol* name, Symbol* sig, fieldDescriptor* fd) const ;
580580 // find field according to JVM spec 5.4.3.2, returns the klass in which the field is defined
581- Klass* find_field (Symbol* name, Symbol* sig, fieldDescriptor* fd) const ;
581+ Klass* find_field (Symbol* name, Symbol* sig, fieldDescriptor* fd) const override ;
582582 // find instance or static fields according to JVM spec 5.4.3.2, returns the klass in which the field is defined
583583 Klass* find_field (Symbol* name, Symbol* sig, bool is_static, fieldDescriptor* fd) const ;
584584
@@ -637,7 +637,7 @@ class InstanceKlass: public Klass {
637637 Method* uncached_lookup_method (const Symbol* name,
638638 const Symbol* signature,
639639 OverpassLookupMode overpass_mode,
640- PrivateLookupMode private_mode = PrivateLookupMode::find) const ;
640+ PrivateLookupMode private_mode = PrivateLookupMode::find) const override ;
641641
642642 // lookup a method in all the interfaces that this class implements
643643 // (returns null if not found)
@@ -660,7 +660,7 @@ class InstanceKlass: public Klass {
660660 void set_constants (ConstantPool* c) { _constants = c; }
661661
662662 // protection domain
663- oop protection_domain () const ;
663+ oop protection_domain () const override ;
664664
665665 // signers
666666 objArrayOop signers () const ;
@@ -834,7 +834,7 @@ class InstanceKlass: public Klass {
834834
835835 // Check whether reflection/jni/jvm code is allowed to instantiate this class;
836836 // if not, throw either an Error or an Exception.
837- virtual void check_valid_for_instantiation (bool throwError, TRAPS);
837+ void check_valid_for_instantiation (bool throwError, TRAPS) override ;
838838
839839 // initialization
840840 void call_class_initializer (TRAPS);
@@ -901,12 +901,12 @@ class InstanceKlass: public Klass {
901901 public:
902902 // virtual operations from Klass
903903 GrowableArray<Klass*>* compute_secondary_supers (int num_extra_slots,
904- Array<InstanceKlass*>* transitive_interfaces);
905- bool can_be_primary_super_slow () const ;
906- size_t oop_size (oop obj) const { return size_helper (); }
904+ Array<InstanceKlass*>* transitive_interfaces) override ;
905+ bool can_be_primary_super_slow () const override ;
906+ size_t oop_size (oop obj) const override { return size_helper (); }
907907 // slow because it's a virtual call and used for verifying the layout_helper.
908908 // Using the layout_helper bits, we can call is_instance_klass without a virtual call.
909- DEBUG_ONLY (bool is_instance_klass_slow () const { return true ; })
909+ DEBUG_ONLY (bool is_instance_klass_slow () const override { return true ; })
910910
911911 // Iterators
912912 void do_local_static_fields (FieldClosure* cl);
@@ -932,7 +932,7 @@ class InstanceKlass: public Klass {
932932 return (Klass::super () == nullptr ) ? nullptr : InstanceKlass::cast (Klass::super ());
933933 }
934934
935- virtual InstanceKlass* java_super () const {
935+ InstanceKlass* java_super () const override {
936936 return InstanceKlass::super ();
937937 }
938938
@@ -949,10 +949,10 @@ class InstanceKlass: public Klass {
949949 (is_interface ? (int )sizeof (Klass*)/wordSize : 0 ));
950950 }
951951
952- int size () const { return size (vtable_length (),
953- itable_length (),
954- nonstatic_oop_map_size (),
955- is_interface ());
952+ int size () const override { return size (vtable_length (),
953+ itable_length (),
954+ nonstatic_oop_map_size (),
955+ is_interface ());
956956 }
957957
958958
@@ -1008,15 +1008,15 @@ class InstanceKlass: public Klass {
10081008 void static deallocate_record_components (ClassLoaderData* loader_data,
10091009 Array<RecordComponent*>* record_component);
10101010
1011- virtual bool on_stack () const ;
1011+ bool on_stack () const override ;
10121012
10131013 // callbacks for actions during class unloading
10141014 static void unload_class (InstanceKlass* ik);
10151015
1016- virtual void release_C_heap_structures (bool release_sub_metadata = true );
1016+ void release_C_heap_structures (bool release_sub_metadata = true ) override ;
10171017
10181018 // Naming
1019- const char * signature_name () const ;
1019+ const char * signature_name () const override ;
10201020
10211021 // Oop fields (and metadata) iterators
10221022 //
@@ -1095,12 +1095,12 @@ class InstanceKlass: public Klass {
10951095 oop init_lock () const ;
10961096
10971097 // Returns the array class for the n'th dimension
1098- virtual ArrayKlass* array_klass (int n, TRAPS);
1099- virtual ArrayKlass* array_klass_or_null (int n);
1098+ ArrayKlass* array_klass (int n, TRAPS) override ;
1099+ ArrayKlass* array_klass_or_null (int n) override ;
11001100
11011101 // Returns the array class with this class as element type
1102- virtual ArrayKlass* array_klass (TRAPS);
1103- virtual ArrayKlass* array_klass_or_null ();
1102+ ArrayKlass* array_klass (TRAPS) override ;
1103+ ArrayKlass* array_klass_or_null () override ;
11041104
11051105 static void clean_initialization_error_table ();
11061106private:
@@ -1139,9 +1139,9 @@ class InstanceKlass: public Klass {
11391139
11401140#if INCLUDE_CDS
11411141 // CDS support - remove and restore oops from metadata. Oops are not shared.
1142- virtual void remove_unshareable_info ();
1142+ void remove_unshareable_info () override ;
11431143 void remove_unshareable_flags ();
1144- virtual void remove_java_mirror ();
1144+ void remove_java_mirror () override ;
11451145 void restore_unshareable_info (ClassLoaderData* loader_data, Handle protection_domain, PackageEntry* pkg_entry, TRAPS);
11461146 void init_shared_package_entry ();
11471147 bool can_be_verified_at_dumptime () const ;
@@ -1154,35 +1154,35 @@ class InstanceKlass: public Klass {
11541154 _misc_flags.set_has_init_deps_processed (true );
11551155 }
11561156
1157- u2 compute_modifier_flags () const ;
1157+ u2 compute_modifier_flags () const override ;
11581158
11591159public:
11601160 // JVMTI support
1161- jint jvmti_class_status () const ;
1161+ jint jvmti_class_status () const override ;
11621162
1163- virtual void metaspace_pointers_do (MetaspaceClosure* iter);
1163+ void metaspace_pointers_do (MetaspaceClosure* iter) override ;
11641164
11651165 public:
11661166 // Printing
1167- void print_on (outputStream* st) const ;
1168- void print_value_on (outputStream* st) const ;
1167+ void print_on (outputStream* st) const override ;
1168+ void print_value_on (outputStream* st) const override ;
11691169
1170- void oop_print_value_on (oop obj, outputStream* st);
1170+ void oop_print_value_on (oop obj, outputStream* st) override ;
11711171
1172- void oop_print_on (oop obj, outputStream* st);
1172+ void oop_print_on (oop obj, outputStream* st) override ;
11731173
11741174#ifndef PRODUCT
11751175 void print_dependent_nmethods (bool verbose = false );
11761176 bool is_dependent_nmethod (nmethod* nm);
11771177 bool verify_itable_index (int index);
11781178#endif
11791179
1180- const char * internal_name () const ;
1180+ const char * internal_name () const override ;
11811181
11821182 // Verification
1183- void verify_on (outputStream* st);
1183+ void verify_on (outputStream* st) override ;
11841184
1185- void oop_verify_on (oop obj, outputStream* st);
1185+ void oop_verify_on (oop obj, outputStream* st) override ;
11861186
11871187 // Logging
11881188 void print_class_load_logging (ClassLoaderData* loader_data,
0 commit comments