< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page

 523                                        TRAPS);
 524 
 525   JavaThread* init_thread()  { return AtomicAccess::load(&_init_thread); }
 526   const char* init_thread_name() {
 527     return init_thread()->name_raw();
 528   }
 529 
 530  public:
 531   // initialization state
 532   bool is_loaded() const                   { return init_state() >= loaded; }
 533   bool is_linked() const                   { return init_state() >= linked; }
 534   bool is_initialized() const              { return init_state() == fully_initialized; }
 535   bool is_not_initialized() const          { return init_state() <  being_initialized; }
 536   bool is_being_initialized() const        { return init_state() == being_initialized; }
 537   bool is_in_error_state() const           { return init_state() == initialization_error; }
 538   bool is_reentrant_initialization(Thread *thread)  { return thread == _init_thread; }
 539   ClassState  init_state() const           { return AtomicAccess::load_acquire(&_init_state); }
 540   const char* init_state_name() const;
 541   bool is_rewritten() const                { return _misc_flags.rewritten(); }
 542 


 543   // is this a sealed class
 544   bool is_sealed() const;
 545 
 546   // defineClass specified verification
 547   bool should_verify_class() const         { return _misc_flags.should_verify_class(); }
 548   void set_should_verify_class(bool value) { _misc_flags.set_should_verify_class(value); }
 549 
 550   // marking
 551   bool is_marked_dependent() const         { return _misc_flags.is_marked_dependent(); }
 552   void set_is_marked_dependent(bool value) { _misc_flags.set_is_marked_dependent(value); }
 553 
 554   // initialization (virtuals from Klass)
 555   bool should_be_initialized() const override;  // means that initialize should be called
 556   void initialize_with_aot_initialized_mirror(TRAPS);
 557   void assert_no_clinit_will_run_for_aot_initialized_class() const NOT_DEBUG_RETURN;
 558   void initialize(TRAPS) override;
 559   void initialize_preemptable(TRAPS) override;
 560   void link_class(TRAPS);
 561   bool link_class_or_fail(TRAPS); // returns false on failure
 562   void rewrite_class(TRAPS);

 807   void update_methods_jmethod_cache();
 808 
 809   // annotations support
 810   Annotations* annotations() const          { return _annotations; }
 811   void set_annotations(Annotations* anno)   { _annotations = anno; }
 812 
 813   AnnotationArray* class_annotations() const {
 814     return (_annotations != nullptr) ? _annotations->class_annotations() : nullptr;
 815   }
 816   Array<AnnotationArray*>* fields_annotations() const {
 817     return (_annotations != nullptr) ? _annotations->fields_annotations() : nullptr;
 818   }
 819   AnnotationArray* class_type_annotations() const {
 820     return (_annotations != nullptr) ? _annotations->class_type_annotations() : nullptr;
 821   }
 822   Array<AnnotationArray*>* fields_type_annotations() const {
 823     return (_annotations != nullptr) ? _annotations->fields_type_annotations() : nullptr;
 824   }
 825   // allocation
 826   instanceOop allocate_instance(TRAPS);
 827   static instanceOop allocate_instance(oop cls, TRAPS);
 828 
 829   // additional member function to return a handle
 830   instanceHandle allocate_instance_handle(TRAPS);
 831 
 832   // Helper function
 833   static instanceOop register_finalizer(instanceOop i, TRAPS);
 834 
 835   // Check whether reflection/jni/jvm code is allowed to instantiate this class;
 836   // if not, throw either an Error or an Exception.
 837   void check_valid_for_instantiation(bool throwError, TRAPS) override;
 838 
 839   // initialization
 840   void call_class_initializer(TRAPS);
 841   void set_initialization_state_and_notify(ClassState state, TRAPS);
 842 
 843   // OopMapCache support
 844   OopMapCache* oop_map_cache()               { return _oop_map_cache; }
 845   void set_oop_map_cache(OopMapCache *cache) { _oop_map_cache = cache; }
 846   void mask_for(const methodHandle& method, int bci, InterpreterOopMap* entry);
 847 

 523                                        TRAPS);
 524 
 525   JavaThread* init_thread()  { return AtomicAccess::load(&_init_thread); }
 526   const char* init_thread_name() {
 527     return init_thread()->name_raw();
 528   }
 529 
 530  public:
 531   // initialization state
 532   bool is_loaded() const                   { return init_state() >= loaded; }
 533   bool is_linked() const                   { return init_state() >= linked; }
 534   bool is_initialized() const              { return init_state() == fully_initialized; }
 535   bool is_not_initialized() const          { return init_state() <  being_initialized; }
 536   bool is_being_initialized() const        { return init_state() == being_initialized; }
 537   bool is_in_error_state() const           { return init_state() == initialization_error; }
 538   bool is_reentrant_initialization(Thread *thread)  { return thread == _init_thread; }
 539   ClassState  init_state() const           { return AtomicAccess::load_acquire(&_init_state); }
 540   const char* init_state_name() const;
 541   bool is_rewritten() const                { return _misc_flags.rewritten(); }
 542 
 543   static const char* state2name(ClassState state);
 544 
 545   // is this a sealed class
 546   bool is_sealed() const;
 547 
 548   // defineClass specified verification
 549   bool should_verify_class() const         { return _misc_flags.should_verify_class(); }
 550   void set_should_verify_class(bool value) { _misc_flags.set_should_verify_class(value); }
 551 
 552   // marking
 553   bool is_marked_dependent() const         { return _misc_flags.is_marked_dependent(); }
 554   void set_is_marked_dependent(bool value) { _misc_flags.set_is_marked_dependent(value); }
 555 
 556   // initialization (virtuals from Klass)
 557   bool should_be_initialized() const override;  // means that initialize should be called
 558   void initialize_with_aot_initialized_mirror(TRAPS);
 559   void assert_no_clinit_will_run_for_aot_initialized_class() const NOT_DEBUG_RETURN;
 560   void initialize(TRAPS) override;
 561   void initialize_preemptable(TRAPS) override;
 562   void link_class(TRAPS);
 563   bool link_class_or_fail(TRAPS); // returns false on failure
 564   void rewrite_class(TRAPS);

 809   void update_methods_jmethod_cache();
 810 
 811   // annotations support
 812   Annotations* annotations() const          { return _annotations; }
 813   void set_annotations(Annotations* anno)   { _annotations = anno; }
 814 
 815   AnnotationArray* class_annotations() const {
 816     return (_annotations != nullptr) ? _annotations->class_annotations() : nullptr;
 817   }
 818   Array<AnnotationArray*>* fields_annotations() const {
 819     return (_annotations != nullptr) ? _annotations->fields_annotations() : nullptr;
 820   }
 821   AnnotationArray* class_type_annotations() const {
 822     return (_annotations != nullptr) ? _annotations->class_type_annotations() : nullptr;
 823   }
 824   Array<AnnotationArray*>* fields_type_annotations() const {
 825     return (_annotations != nullptr) ? _annotations->fields_type_annotations() : nullptr;
 826   }
 827   // allocation
 828   instanceOop allocate_instance(TRAPS);
 829   static instanceOop allocate_instance(oop cls, const char* who, TRAPS);
 830 
 831   // additional member function to return a handle
 832   instanceHandle allocate_instance_handle(TRAPS);
 833 
 834   // Helper function
 835   static instanceOop register_finalizer(instanceOop i, TRAPS);
 836 
 837   // Check whether reflection/jni/jvm code is allowed to instantiate this class;
 838   // if not, throw either an Error or an Exception.
 839   void check_valid_for_instantiation(bool throwError, TRAPS) override;
 840 
 841   // initialization
 842   void call_class_initializer(TRAPS);
 843   void set_initialization_state_and_notify(ClassState state, TRAPS);
 844 
 845   // OopMapCache support
 846   OopMapCache* oop_map_cache()               { return _oop_map_cache; }
 847   void set_oop_map_cache(OopMapCache *cache) { _oop_map_cache = cache; }
 848   void mask_for(const methodHandle& method, int bci, InterpreterOopMap* entry);
 849 
< prev index next >