621 virtual void remove_java_mirror();
622
623 bool is_unshareable_info_restored() const {
624 assert(is_shared(), "use this for shared classes only");
625 if (has_archived_mirror_index()) {
626 // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
627 return false;
628 } else if (_java_mirror.is_empty()) {
629 return false;
630 } else {
631 return true;
632 }
633 }
634 #endif // INCLUDE_CDS
635
636 public:
637 // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
638 // These functions describe behavior for the oop not the KLASS.
639
640 // actual oop size of obj in memory in word size.
641 virtual size_t oop_size(oop obj) const = 0;
642
643 // Size of klass in word size.
644 virtual int size() const = 0;
645
646 // Returns the Java name for a class (Resource allocated)
647 // For arrays, this returns the name of the element with a leading '['.
648 // For classes, this returns the name with the package separators
649 // turned into '.'s.
650 const char* external_name() const;
651 // Returns the name for a class (Resource allocated) as the class
652 // would appear in a signature.
653 // For arrays, this returns the name of the element with a leading '['.
654 // For classes, this returns the name with a leading 'L' and a trailing ';'
655 // and the package separators as '/'.
656 virtual const char* signature_name() const;
657
658 const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const;
659 const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const;
660
661 // Returns "interface", "abstract class" or "class".
771 virtual const char* internal_name() const = 0;
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 // Returns true if this Klass needs to be addressable via narrow Klass ID.
789 inline bool needs_narrow_id() const;
790
791 };
792
793 #endif // SHARE_OOPS_KLASS_HPP
|
621 virtual void remove_java_mirror();
622
623 bool is_unshareable_info_restored() const {
624 assert(is_shared(), "use this for shared classes only");
625 if (has_archived_mirror_index()) {
626 // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
627 return false;
628 } else if (_java_mirror.is_empty()) {
629 return false;
630 } else {
631 return true;
632 }
633 }
634 #endif // INCLUDE_CDS
635
636 public:
637 // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
638 // These functions describe behavior for the oop not the KLASS.
639
640 // actual oop size of obj in memory in word size.
641 virtual size_t oop_size(oop obj, markWord mark) const = 0;
642 size_t oop_size(oop obj) const;
643
644 // Size of klass in word size.
645 virtual int size() const = 0;
646
647 // Returns the Java name for a class (Resource allocated)
648 // For arrays, this returns the name of the element with a leading '['.
649 // For classes, this returns the name with the package separators
650 // turned into '.'s.
651 const char* external_name() const;
652 // Returns the name for a class (Resource allocated) as the class
653 // would appear in a signature.
654 // For arrays, this returns the name of the element with a leading '['.
655 // For classes, this returns the name with a leading 'L' and a trailing ';'
656 // and the package separators as '/'.
657 virtual const char* signature_name() const;
658
659 const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const;
660 const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const;
661
662 // Returns "interface", "abstract class" or "class".
772 virtual const char* internal_name() const = 0;
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 // Returns true if this Klass needs to be addressable via narrow Klass ID.
790 inline bool needs_narrow_id() const;
791
792 virtual int hash_offset_in_bytes(oop obj, markWord m) const = 0;
793 static int kind_offset_in_bytes() { return (int)offset_of(Klass, _kind); }
794
795 bool expand_for_hash(oop obj, markWord m) const;
796 };
797
798 #endif // SHARE_OOPS_KLASS_HPP
|