632 virtual void remove_java_mirror();
633
634 bool is_unshareable_info_restored() const {
635 assert(in_aot_cache(), "use this for shared classes only");
636 if (has_archived_mirror_index()) {
637 // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
638 return false;
639 } else if (_java_mirror.is_empty()) {
640 return false;
641 } else {
642 return true;
643 }
644 }
645 #endif // INCLUDE_CDS
646
647 public:
648 // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
649 // These functions describe behavior for the oop not the KLASS.
650
651 // actual oop size of obj in memory in word size.
652 virtual size_t oop_size(oop obj) const = 0;
653
654 // Returns the Java name for a class (Resource allocated)
655 // For arrays, this returns the name of the element with a leading '['.
656 // For classes, this returns the name with the package separators
657 // turned into '.'s.
658 const char* external_name() const;
659 // Returns the name for a class (Resource allocated) as the class
660 // would appear in a signature.
661 // For arrays, this returns the name of the element with a leading '['.
662 // For classes, this returns the name with a leading 'L' and a trailing ';'
663 // and the package separators as '/'.
664 virtual const char* signature_name() const;
665
666 const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const;
667 const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const;
668
669 // Returns "interface", "abstract class" or "class".
670 const char* external_kind() const;
671
672 // type testing operations
767
768 virtual void oop_print_value_on(oop obj, outputStream* st);
769 virtual void oop_print_on (oop obj, outputStream* st);
770
771 void print_secondary_supers_on(outputStream* st) const;
772
773 // Verification
774 virtual void verify_on(outputStream* st);
775 void verify() { verify_on(tty); }
776
777 #ifndef PRODUCT
778 bool verify_vtable_index(int index);
779 #endif
780
781 virtual void oop_verify_on(oop obj, outputStream* st);
782
783 // for error reporting
784 static bool is_valid(Klass* k);
785
786 static void on_secondary_supers_verification_failure(Klass* super, Klass* sub, bool linear_result, bool table_result, const char* msg);
787 };
788
789 #endif // SHARE_OOPS_KLASS_HPP
|
632 virtual void remove_java_mirror();
633
634 bool is_unshareable_info_restored() const {
635 assert(in_aot_cache(), "use this for shared classes only");
636 if (has_archived_mirror_index()) {
637 // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
638 return false;
639 } else if (_java_mirror.is_empty()) {
640 return false;
641 } else {
642 return true;
643 }
644 }
645 #endif // INCLUDE_CDS
646
647 public:
648 // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
649 // These functions describe behavior for the oop not the KLASS.
650
651 // actual oop size of obj in memory in word size.
652 virtual size_t oop_size(oop obj, markWord mark) const = 0;
653 size_t oop_size(oop obj) const;
654
655 // Returns the Java name for a class (Resource allocated)
656 // For arrays, this returns the name of the element with a leading '['.
657 // For classes, this returns the name with the package separators
658 // turned into '.'s.
659 const char* external_name() const;
660 // Returns the name for a class (Resource allocated) as the class
661 // would appear in a signature.
662 // For arrays, this returns the name of the element with a leading '['.
663 // For classes, this returns the name with a leading 'L' and a trailing ';'
664 // and the package separators as '/'.
665 virtual const char* signature_name() const;
666
667 const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const;
668 const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const;
669
670 // Returns "interface", "abstract class" or "class".
671 const char* external_kind() const;
672
673 // type testing operations
768
769 virtual void oop_print_value_on(oop obj, outputStream* st);
770 virtual void oop_print_on (oop obj, outputStream* st);
771
772 void print_secondary_supers_on(outputStream* st) const;
773
774 // Verification
775 virtual void verify_on(outputStream* st);
776 void verify() { verify_on(tty); }
777
778 #ifndef PRODUCT
779 bool verify_vtable_index(int index);
780 #endif
781
782 virtual void oop_verify_on(oop obj, outputStream* st);
783
784 // for error reporting
785 static bool is_valid(Klass* k);
786
787 static void on_secondary_supers_verification_failure(Klass* super, Klass* sub, bool linear_result, bool table_result, const char* msg);
788
789 virtual int hash_offset_in_bytes(oop obj, markWord m) const = 0;
790
791 static int kind_offset_in_bytes() { return (int)offset_of(Klass, _kind); }
792
793 bool expand_for_hash(oop obj, markWord m) const;
794 };
795
796 #endif // SHARE_OOPS_KLASS_HPP
|