< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page

 265   static void set_protection_domain(oop java_class, oop protection_domain);
 266   static void set_class_loader(oop java_class, oop class_loader);
 267   static void set_component_mirror(oop java_class, oop comp_mirror);
 268   static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain,
 269                                        Handle classData, TRAPS);
 270   static void set_mirror_module_field(JavaThread* current, Klass* K, Handle mirror, Handle module);
 271  public:
 272   static void allocate_fixup_lists();
 273   static void compute_offsets();
 274 
 275   // Instance creation
 276   static void allocate_mirror(Klass* k, bool is_scratch, Handle protection_domain, Handle classData,
 277                               Handle& mirror, Handle& comp_mirror, TRAPS); // returns mirror and comp_mirror
 278   static void create_mirror(Klass* k, Handle class_loader, Handle module,
 279                             Handle protection_domain, Handle classData, TRAPS);
 280   static void fixup_mirror(Klass* k, TRAPS);
 281   static oop  create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS);
 282 
 283   // Archiving
 284   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 285   static void create_scratch_mirror(Klass* k, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
 286   static bool restore_archived_mirror(Klass *k, Handle class_loader, Handle module,
 287                                       Handle protection_domain,
 288                                       TRAPS) NOT_CDS_JAVA_HEAP_RETURN_(false);
 289 
 290   static void fixup_module_field(Klass* k, Handle module);
 291 
 292   // Conversion
 293   static Klass* as_Klass(oop java_class);
 294   static void set_klass(oop java_class, Klass* klass);
 295   static BasicType as_BasicType(oop java_class, Klass** reference_klass = nullptr);
 296   static Symbol* as_signature(oop java_class, bool intern_if_not_found);
 297   static void print_signature(oop java_class, outputStream *st);
 298   static const char* as_external_name(oop java_class);
 299   // Testing
 300   static bool is_instance(oop obj);
 301 
 302   static bool is_primitive(oop java_class);
 303   static BasicType primitive_type(oop java_class);
 304   static oop primitive_mirror(BasicType t);
 305   // JVM_NewArray support
 306   static Klass* array_klass_acquire(oop java_class);
 307   static void release_set_array_klass(oop java_class, Klass* klass);
 308   // compiler support for class operations
 309   static int klass_offset()                { CHECK_INIT(_klass_offset); }
 310   static int array_klass_offset()          { CHECK_INIT(_array_klass_offset); }
 311   // Support for classRedefinedCount field
 312   static int classRedefinedCount(oop the_class_mirror);
 313   static void set_classRedefinedCount(oop the_class_mirror, int value);
 314 
 315   // Support for embedded per-class oops
 316   static oop  protection_domain(oop java_class);
 317   static oop  init_lock(oop java_class);
 318   static void clear_init_lock(oop java_class) {
 319     set_init_lock(java_class, nullptr);
 320   }
 321   static oop  component_mirror(oop java_class);
 322   static objArrayOop signers(oop java_class);
 323   static oop  class_data(oop java_class);
 324   static void set_class_data(oop java_class, oop classData);


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

 326 
 327   static int component_mirror_offset() { return _component_mirror_offset; }
 328 
 329   static oop class_loader(oop java_class);
 330   static void set_module(oop java_class, oop module);
 331   static oop module(oop java_class);
 332 
 333   static oop name(Handle java_class, TRAPS);
 334 
 335   static oop source_file(oop java_class);
 336   static void set_source_file(oop java_class, oop source_file);
 337 
 338   static size_t oop_size(oop java_class);
 339   static void set_oop_size(HeapWord* java_class, size_t size);
 340   static int static_oop_field_count(oop java_class);
 341   static void set_static_oop_field_count(oop java_class, int size);
 342 
 343   static GrowableArray<Klass*>* fixup_mirror_list() {
 344     return _fixup_mirror_list;
 345   }

 652 
 653   static void print_stack_element(outputStream *st, Method* method, int bci);
 654 
 655   static void compute_offsets();
 656   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 657 
 658   // Allocate space for backtrace (created but stack trace not filled in)
 659   static void allocate_backtrace(Handle throwable, TRAPS);
 660   // Fill in current stack trace for throwable with preallocated backtrace (no GC)
 661   static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
 662   // Fill in current stack trace, can cause GC
 663   static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
 664   static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
 665 
 666   // Programmatic access to stack trace
 667   static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
 668 
 669   // For recreating class initialization error exceptions.
 670   static Handle create_initialization_error(JavaThread* current, Handle throwable);
 671 
 672   // Printing


 673   static void print(oop throwable, outputStream* st);
 674   static void print_stack_trace(Handle throwable, outputStream* st);
 675   static void java_printStackTrace(Handle throwable, TRAPS);
 676   // Debugging
 677   friend class JavaClasses;
 678   // Gets the method and bci of the top frame (TOS). Returns false if this failed.
 679   static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
 680 };
 681 
 682 
 683 // Interface to java.lang.reflect.AccessibleObject objects
 684 
 685 class java_lang_reflect_AccessibleObject: AllStatic {
 686  private:
 687   // Note that to reduce dependencies on the JDK we compute these
 688   // offsets at run-time.
 689   static int _override_offset;
 690 
 691   static void compute_offsets();
 692 

 265   static void set_protection_domain(oop java_class, oop protection_domain);
 266   static void set_class_loader(oop java_class, oop class_loader);
 267   static void set_component_mirror(oop java_class, oop comp_mirror);
 268   static void initialize_mirror_fields(Klass* k, Handle mirror, Handle protection_domain,
 269                                        Handle classData, TRAPS);
 270   static void set_mirror_module_field(JavaThread* current, Klass* K, Handle mirror, Handle module);
 271  public:
 272   static void allocate_fixup_lists();
 273   static void compute_offsets();
 274 
 275   // Instance creation
 276   static void allocate_mirror(Klass* k, bool is_scratch, Handle protection_domain, Handle classData,
 277                               Handle& mirror, Handle& comp_mirror, TRAPS); // returns mirror and comp_mirror
 278   static void create_mirror(Klass* k, Handle class_loader, Handle module,
 279                             Handle protection_domain, Handle classData, TRAPS);
 280   static void fixup_mirror(Klass* k, TRAPS);
 281   static oop  create_basic_type_mirror(const char* basic_type_name, BasicType type, TRAPS);
 282 
 283   // Archiving
 284   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 285   static void create_scratch_mirror(Klass* k, Handle protection_domain, TRAPS) NOT_CDS_JAVA_HEAP_RETURN;
 286   static bool restore_archived_mirror(Klass *k, Handle class_loader, Handle module,
 287                                       Handle protection_domain,
 288                                       TRAPS) NOT_CDS_JAVA_HEAP_RETURN_(false);
 289 
 290   static void fixup_module_field(Klass* k, Handle module);
 291 
 292   // Conversion
 293   static Klass* as_Klass(oop java_class);
 294   static void set_klass(oop java_class, Klass* klass);
 295   static BasicType as_BasicType(oop java_class, Klass** reference_klass = nullptr);
 296   static Symbol* as_signature(oop java_class, bool intern_if_not_found);
 297   static void print_signature(oop java_class, outputStream *st);
 298   static const char* as_external_name(oop java_class);
 299   // Testing
 300   static bool is_instance(oop obj);
 301 
 302   static bool is_primitive(oop java_class);
 303   static BasicType primitive_type(oop java_class);
 304   static oop primitive_mirror(BasicType t);
 305   // JVM_NewArray support
 306   static Klass* array_klass_acquire(oop java_class);
 307   static void release_set_array_klass(oop java_class, Klass* klass);
 308   // compiler support for class operations
 309   static int klass_offset()                { CHECK_INIT(_klass_offset); }
 310   static int array_klass_offset()          { CHECK_INIT(_array_klass_offset); }
 311   // Support for classRedefinedCount field
 312   static int classRedefinedCount(oop the_class_mirror);
 313   static void set_classRedefinedCount(oop the_class_mirror, int value);
 314 
 315   // Support for embedded per-class oops
 316   static oop  protection_domain(oop java_class);
 317   static oop  init_lock(oop java_class);
 318   static void clear_init_lock(oop java_class) {
 319     set_init_lock(java_class, nullptr);
 320   }
 321   static oop  component_mirror(oop java_class);
 322   static objArrayOop signers(oop java_class);
 323   static oop  class_data(oop java_class);
 324   static void set_class_data(oop java_class, oop classData);
 325 
 326   static oop  reflection_data(oop java_class);
 327   static void set_reflection_data(oop java_class, oop reflection_data);
 328   static bool has_reflection_data(oop java_class);
 329 
 330   static int component_mirror_offset() { return _component_mirror_offset; }
 331 
 332   static oop class_loader(oop java_class);
 333   static void set_module(oop java_class, oop module);
 334   static oop module(oop java_class);
 335 
 336   static oop name(Handle java_class, TRAPS);
 337 
 338   static oop source_file(oop java_class);
 339   static void set_source_file(oop java_class, oop source_file);
 340 
 341   static size_t oop_size(oop java_class);
 342   static void set_oop_size(HeapWord* java_class, size_t size);
 343   static int static_oop_field_count(oop java_class);
 344   static void set_static_oop_field_count(oop java_class, int size);
 345 
 346   static GrowableArray<Klass*>* fixup_mirror_list() {
 347     return _fixup_mirror_list;
 348   }

 655 
 656   static void print_stack_element(outputStream *st, Method* method, int bci);
 657 
 658   static void compute_offsets();
 659   static void serialize_offsets(SerializeClosure* f) NOT_CDS_RETURN;
 660 
 661   // Allocate space for backtrace (created but stack trace not filled in)
 662   static void allocate_backtrace(Handle throwable, TRAPS);
 663   // Fill in current stack trace for throwable with preallocated backtrace (no GC)
 664   static void fill_in_stack_trace_of_preallocated_backtrace(Handle throwable);
 665   // Fill in current stack trace, can cause GC
 666   static void fill_in_stack_trace(Handle throwable, const methodHandle& method, TRAPS);
 667   static void fill_in_stack_trace(Handle throwable, const methodHandle& method = methodHandle());
 668 
 669   // Programmatic access to stack trace
 670   static void get_stack_trace_elements(int depth, Handle backtrace, objArrayHandle stack_trace, TRAPS);
 671 
 672   // For recreating class initialization error exceptions.
 673   static Handle create_initialization_error(JavaThread* current, Handle throwable);
 674 
 675   static oop create_exception_instance(Symbol* class_name, TRAPS);
 676 
 677     // Printing
 678   static void print(oop throwable, outputStream* st);
 679   static void print_stack_trace(Handle throwable, outputStream* st);
 680   static void java_printStackTrace(Handle throwable, TRAPS);
 681   // Debugging
 682   friend class JavaClasses;
 683   // Gets the method and bci of the top frame (TOS). Returns false if this failed.
 684   static bool get_top_method_and_bci(oop throwable, Method** method, int* bci);
 685 };
 686 
 687 
 688 // Interface to java.lang.reflect.AccessibleObject objects
 689 
 690 class java_lang_reflect_AccessibleObject: AllStatic {
 691  private:
 692   // Note that to reduce dependencies on the JDK we compute these
 693   // offsets at run-time.
 694   static int _override_offset;
 695 
 696   static void compute_offsets();
 697 
< prev index next >