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