< prev index next >

src/hotspot/share/oops/klass.hpp

Print this page

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

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 };
794 
795 #endif // SHARE_OOPS_KLASS_HPP

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

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