< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page

627   virtual void remove_java_mirror();
628 
629   bool is_unshareable_info_restored() const {
630     assert(in_aot_cache(), "use this for shared classes only");
631     if (has_archived_mirror_index()) {
632       // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
633       return false;
634     } else if (_java_mirror.is_empty()) {
635       return false;
636     } else {
637       return true;
638     }
639   }
640 #endif // INCLUDE_CDS
641 
642  public:
643   // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
644   // These functions describe behavior for the oop not the KLASS.
645 
646   // actual oop size of obj in memory in word size.
647   virtual size_t oop_size(oop obj) const = 0;

648 
649   // Returns the Java name for a class (Resource allocated)
650   // For arrays, this returns the name of the element with a leading '['.
651   // For classes, this returns the name with the package separators
652   //     turned into '.'s.
653   const char* external_name() const;
654   // Returns the name for a class (Resource allocated) as the class
655   // would appear in a signature.
656   // For arrays, this returns the name of the element with a leading '['.
657   // For classes, this returns the name with a leading 'L' and a trailing ';'
658   //     and the package separators as '/'.
659   virtual const char* signature_name() const;
660 
661   const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const;
662   const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const;
663 
664   // Returns "interface", "abstract class" or "class".
665   const char* external_kind() const;
666 
667   // type testing operations

762 
763   virtual void oop_print_value_on(oop obj, outputStream* st);
764   virtual void oop_print_on      (oop obj, outputStream* st);
765 
766   void print_secondary_supers_on(outputStream* st) const;
767 
768   // Verification
769   virtual void verify_on(outputStream* st);
770   void verify() { verify_on(tty); }
771 
772 #ifndef PRODUCT
773   bool verify_vtable_index(int index);
774 #endif
775 
776   virtual void oop_verify_on(oop obj, outputStream* st);
777 
778   // for error reporting
779   static bool is_valid(Klass* k);
780 
781   static void on_secondary_supers_verification_failure(Klass* super, Klass* sub, bool linear_result, bool table_result, const char* msg);






782 };
783 
784 #endif // SHARE_OOPS_KLASS_HPP

627   virtual void remove_java_mirror();
628 
629   bool is_unshareable_info_restored() const {
630     assert(in_aot_cache(), "use this for shared classes only");
631     if (has_archived_mirror_index()) {
632       // _java_mirror is not a valid OopHandle but rather an encoded reference in the shared heap
633       return false;
634     } else if (_java_mirror.is_empty()) {
635       return false;
636     } else {
637       return true;
638     }
639   }
640 #endif // INCLUDE_CDS
641 
642  public:
643   // ALL FUNCTIONS BELOW THIS POINT ARE DISPATCHED FROM AN OOP
644   // These functions describe behavior for the oop not the KLASS.
645 
646   // actual oop size of obj in memory in word size.
647   virtual size_t oop_size(oop obj, markWord mark) const = 0;
648   size_t oop_size(oop obj) const;
649 
650   // Returns the Java name for a class (Resource allocated)
651   // For arrays, this returns the name of the element with a leading '['.
652   // For classes, this returns the name with the package separators
653   //     turned into '.'s.
654   const char* external_name() const;
655   // Returns the name for a class (Resource allocated) as the class
656   // would appear in a signature.
657   // For arrays, this returns the name of the element with a leading '['.
658   // For classes, this returns the name with a leading 'L' and a trailing ';'
659   //     and the package separators as '/'.
660   virtual const char* signature_name() const;
661 
662   const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const;
663   const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const;
664 
665   // Returns "interface", "abstract class" or "class".
666   const char* external_kind() const;
667 
668   // type testing operations

763 
764   virtual void oop_print_value_on(oop obj, outputStream* st);
765   virtual void oop_print_on      (oop obj, outputStream* st);
766 
767   void print_secondary_supers_on(outputStream* st) const;
768 
769   // Verification
770   virtual void verify_on(outputStream* st);
771   void verify() { verify_on(tty); }
772 
773 #ifndef PRODUCT
774   bool verify_vtable_index(int index);
775 #endif
776 
777   virtual void oop_verify_on(oop obj, outputStream* st);
778 
779   // for error reporting
780   static bool is_valid(Klass* k);
781 
782   static void on_secondary_supers_verification_failure(Klass* super, Klass* sub, bool linear_result, bool table_result, const char* msg);
783 
784   virtual int hash_offset_in_bytes(oop obj, markWord m) const = 0;
785 
786   static int kind_offset_in_bytes() { return (int)offset_of(Klass, _kind); }
787 
788   bool expand_for_hash(oop obj, markWord m) const;
789 };
790 
791 #endif // SHARE_OOPS_KLASS_HPP
< prev index next >