< prev index next >

src/hotspot/share/classfile/javaClasses.hpp

Print this page

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


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

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

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


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

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

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