< prev index next >

src/hotspot/share/oops/instanceKlass.hpp

Print this page

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


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

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

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

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