< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page

 269   static void set_protection_domain(oop java_class, oop protection_domain);
 270   static void set_class_loader(oop java_class, oop class_loader);
 271   static void set_component_mirror(oop java_class, oop comp_mirror);
 272   static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain,
 273                                        Handle classData, TRAPS);
 274   static void set_mirror_module_field(JavaThread* current, Klass* K, Handle mirror, Handle module);
 275  public:
 276   static void allocate_fixup_lists();
 277   static void compute_offsets();
 278 
 279   // Instance creation
 280   static void allocate_mirror(Klass* k, bool is_scratch, Handle protection_domain, Handle classData,
 281                               Handle& mirror, Handle& comp_mirror, TRAPS); // returns mirror and comp_mirror
 282   static void create_mirror(Klass* k, Handle class_loader, Handle module,
 283                             Handle protection_domain, Handle classData, TRAPS);
 284   static void fixup_mirror(Klass* k, TRAPS);
 285   static oop  create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS);
 286 
 287   // Archiving
 288   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 289   static void create_scratch_mirror(Klass* k, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
 290   static bool restore_archived_mirror(Klass *k, Handle class_loader, Handle module,
 291                                       Handle protection_domain,
 292                                       TRAPS) NOT_CDS_JAVA_HEAP_RETURN_(false);
 293 
 294   static void fixup_module_field(Klass* k, Handle module);
 295 
 296   // Conversion
 297   static Klass* as_Klass(oop java_class);
 298   static void set_klass(oop java_class, Klass* klass);
 299   static BasicType as_BasicType(oop java_class, Klass** reference_klass = nullptr);
 300   static Symbol* as_signature(oop java_class, bool intern_if_not_found);
 301   static void print_signature(oop java_class, outputStream *st);
 302   static const char* as_external_name(oop java_class);
 303   // Testing
 304   static bool is_instance(oop obj);
 305 
 306   static bool is_primitive(oop java_class);
 307   static void set_is_primitive(oop java_class);
 308   static BasicType primitive_type(oop java_class);
 309   static oop primitive_mirror(BasicType t);

 311   static Klass* array_klass_acquire(oop java_class);
 312   static void release_set_array_klass(oop java_class, Klass* klass);
 313   // compiler support for class operations
 314   static int klass_offset()                { CHECK_INIT(_klass_offset); }
 315   static int array_klass_offset()          { CHECK_INIT(_array_klass_offset); }
 316   // Support for classRedefinedCount field
 317   static int classRedefinedCount(oop the_class_mirror);
 318   static void set_classRedefinedCount(oop the_class_mirror, int value);
 319 
 320   // Support for embedded per-class oops
 321   static oop  protection_domain(oop java_class);
 322   static oop  init_lock(oop java_class);
 323   static void clear_init_lock(oop java_class) {
 324     set_init_lock(java_class, nullptr);
 325   }
 326   static oop  component_mirror(oop java_class);
 327   static int component_mirror_offset() { return _component_mirror_offset; }
 328   static objArrayOop signers(oop java_class);
 329   static oop  class_data(oop java_class);
 330   static void set_class_data(oop java_class, oop classData);


 331   static void set_reflection_data(oop java_class, oop reflection_data);

 332   static int reflection_data_offset() { return _reflectionData_offset; }
 333 
 334   static oop class_loader(oop java_class);
 335   static void set_module(oop java_class, oop module);
 336   static oop module(oop java_class);
 337 
 338   static oop name(Handle java_class, TRAPS);
 339 
 340   static oop source_file(oop java_class);
 341   static void set_source_file(oop java_class, oop source_file);
 342 
 343   static int modifiers(oop java_class);
 344   static void set_modifiers(oop java_class, u2 value);
 345 
 346   static int raw_access_flags(oop java_class);
 347   static void set_raw_access_flags(oop java_class, u2 value);
 348 
 349   static size_t oop_size(oop java_class);
 350   static void set_oop_size(HeapWord* java_class, size_t size);
 351   static int static_oop_field_count(oop java_class);

 671 
 672   static void print_stack_element(outputStream *st, Method* method, int bci);
 673 
 674   static void compute_offsets();
 675   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 676 
 677   // Allocate space for backtrace (created but stack trace not filled in)
 678   static void allocate_backtrace(Handle throwable, TRAPS);
 679   // Fill in current stack trace for throwable with preallocated backtrace (no GC)
 680   static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
 681   // Fill in current stack trace, can cause GC
 682   static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
 683   static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
 684 
 685   // Programmatic access to stack trace
 686   static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
 687 
 688   // For recreating class initialization error exceptions.
 689   static Handle create_initialization_error(JavaThread* current, Handle throwable);
 690 


 691   // Printing
 692   static void print(oop throwable, outputStream* st);
 693   static void print_stack_trace(Handle throwable, outputStream* st);
 694   static void java_printStackTrace(Handle throwable, TRAPS);
 695   // Debugging
 696   friend class JavaClasses;
 697   // Gets the method and bci of the top frame (TOS). Returns false if this failed.
 698   static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
 699 };
 700 
 701 
 702 // Interface to java.lang.reflect.AccessibleObject objects
 703 
 704 class java_lang_reflect_AccessibleObject: AllStatic {
 705  private:
 706   // Note that to reduce dependencies on the JDK we compute these
 707   // offsets at run-time.
 708   static int _override_offset;
 709 
 710   static void compute_offsets();

 269   static void set_protection_domain(oop java_class, oop protection_domain);
 270   static void set_class_loader(oop java_class, oop class_loader);
 271   static void set_component_mirror(oop java_class, oop comp_mirror);
 272   static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain,
 273                                        Handle classData, TRAPS);
 274   static void set_mirror_module_field(JavaThread* current, Klass* K, Handle mirror, Handle module);
 275  public:
 276   static void allocate_fixup_lists();
 277   static void compute_offsets();
 278 
 279   // Instance creation
 280   static void allocate_mirror(Klass* k, bool is_scratch, Handle protection_domain, Handle classData,
 281                               Handle& mirror, Handle& comp_mirror, TRAPS); // returns mirror and comp_mirror
 282   static void create_mirror(Klass* k, Handle class_loader, Handle module,
 283                             Handle protection_domain, Handle classData, TRAPS);
 284   static void fixup_mirror(Klass* k, TRAPS);
 285   static oop  create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS);
 286 
 287   // Archiving
 288   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 289   static void create_scratch_mirror(Klass* k, Handle protection_domain, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
 290   static bool restore_archived_mirror(Klass *k, Handle class_loader, Handle module,
 291                                       Handle protection_domain,
 292                                       TRAPS) NOT_CDS_JAVA_HEAP_RETURN_(false);
 293 
 294   static void fixup_module_field(Klass* k, Handle module);
 295 
 296   // Conversion
 297   static Klass* as_Klass(oop java_class);
 298   static void set_klass(oop java_class, Klass* klass);
 299   static BasicType as_BasicType(oop java_class, Klass** reference_klass = nullptr);
 300   static Symbol* as_signature(oop java_class, bool intern_if_not_found);
 301   static void print_signature(oop java_class, outputStream *st);
 302   static const char* as_external_name(oop java_class);
 303   // Testing
 304   static bool is_instance(oop obj);
 305 
 306   static bool is_primitive(oop java_class);
 307   static void set_is_primitive(oop java_class);
 308   static BasicType primitive_type(oop java_class);
 309   static oop primitive_mirror(BasicType t);

 311   static Klass* array_klass_acquire(oop java_class);
 312   static void release_set_array_klass(oop java_class, Klass* klass);
 313   // compiler support for class operations
 314   static int klass_offset()                { CHECK_INIT(_klass_offset); }
 315   static int array_klass_offset()          { CHECK_INIT(_array_klass_offset); }
 316   // Support for classRedefinedCount field
 317   static int classRedefinedCount(oop the_class_mirror);
 318   static void set_classRedefinedCount(oop the_class_mirror, int value);
 319 
 320   // Support for embedded per-class oops
 321   static oop  protection_domain(oop java_class);
 322   static oop  init_lock(oop java_class);
 323   static void clear_init_lock(oop java_class) {
 324     set_init_lock(java_class, nullptr);
 325   }
 326   static oop  component_mirror(oop java_class);
 327   static int component_mirror_offset() { return _component_mirror_offset; }
 328   static objArrayOop signers(oop java_class);
 329   static oop  class_data(oop java_class);
 330   static void set_class_data(oop java_class, oop classData);
 331 
 332   static oop  reflection_data(oop java_class);
 333   static void set_reflection_data(oop java_class, oop reflection_data);
 334   static bool has_reflection_data(oop java_class);
 335   static int reflection_data_offset() { return _reflectionData_offset; }
 336 
 337   static oop class_loader(oop java_class);
 338   static void set_module(oop java_class, oop module);
 339   static oop module(oop java_class);
 340 
 341   static oop name(Handle java_class, TRAPS);
 342 
 343   static oop source_file(oop java_class);
 344   static void set_source_file(oop java_class, oop source_file);
 345 
 346   static int modifiers(oop java_class);
 347   static void set_modifiers(oop java_class, u2 value);
 348 
 349   static int raw_access_flags(oop java_class);
 350   static void set_raw_access_flags(oop java_class, u2 value);
 351 
 352   static size_t oop_size(oop java_class);
 353   static void set_oop_size(HeapWord* java_class, size_t size);
 354   static int static_oop_field_count(oop java_class);

 674 
 675   static void print_stack_element(outputStream *st, Method* method, int bci);
 676 
 677   static void compute_offsets();
 678   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 679 
 680   // Allocate space for backtrace (created but stack trace not filled in)
 681   static void allocate_backtrace(Handle throwable, TRAPS);
 682   // Fill in current stack trace for throwable with preallocated backtrace (no GC)
 683   static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
 684   // Fill in current stack trace, can cause GC
 685   static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
 686   static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
 687 
 688   // Programmatic access to stack trace
 689   static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
 690 
 691   // For recreating class initialization error exceptions.
 692   static Handle create_initialization_error(JavaThread* current, Handle throwable);
 693 
 694   static oop create_exception_instance(Symbol* class_name, TRAPS);
 695 
 696   // Printing
 697   static void print(oop throwable, outputStream* st);
 698   static void print_stack_trace(Handle throwable, outputStream* st);
 699   static void java_printStackTrace(Handle throwable, TRAPS);
 700   // Debugging
 701   friend class JavaClasses;
 702   // Gets the method and bci of the top frame (TOS). Returns false if this failed.
 703   static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
 704 };
 705 
 706 
 707 // Interface to java.lang.reflect.AccessibleObject objects
 708 
 709 class java_lang_reflect_AccessibleObject: AllStatic {
 710  private:
 711   // Note that to reduce dependencies on the JDK we compute these
 712   // offsets at run-time.
 713   static int _override_offset;
 714 
 715   static void compute_offsets();
< prev index next >