< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page

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

649 
650   // Size of klass in word size.
651   virtual int size() const = 0;
652 
653   // Returns the Java name for a class (Resource allocated)
654   // For arrays, this returns the name of the element with a leading '['.
655   // For classes, this returns the name with the package separators
656   //     turned into '.'s.
657   const char* external_name() const;
658   // Returns the name for a class (Resource allocated) as the class
659   // would appear in a signature.
660   // For arrays, this returns the name of the element with a leading '['.
661   // For classes, this returns the name with a leading 'L' and a trailing ';'
662   //     and the package separators as '/'.
663   virtual const char* signature_name() const;
664 
665   const char* joint_in_module_of_loader(const Klass* class2, bool include_parent_loader = false) const;
666   const char* class_in_module_of_loader(bool use_are = false, bool include_parent_loader = false) const;
667 
668   // 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 };
793 
794 #endif // SHARE_OOPS_KLASS_HPP

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

773   virtual const char* internal_name() const = 0;
774 
775   // Verification
776   virtual void verify_on(outputStream* st);
777   void verify() { verify_on(tty); }
778 
779 #ifndef PRODUCT
780   bool verify_vtable_index(int index);
781 #endif
782 
783   virtual void oop_verify_on(oop obj, outputStream* st);
784 
785   // for error reporting
786   static bool is_valid(Klass* k);
787 
788   static void on_secondary_supers_verification_failure(Klass* super, Klass* sub, bool linear_result, bool table_result, const char* msg);
789 
790   // Returns true if this Klass needs to be addressable via narrow Klass ID.
791   inline bool needs_narrow_id() const;
792 
793   virtual int hash_offset_in_bytes(oop obj) const = 0;
794   static int kind_offset_in_bytes() { return (int)offset_of(Klass, _kind); }
795 
796   bool expand_for_hash(oop obj) const;
797 };
798 
799 #endif // SHARE_OOPS_KLASS_HPP
< prev index next >