563 bool is_subclass_of(const Klass* k) const;
564
565 // subtype check: true if is_subclass_of, or if k is interface and receiver implements it
566 bool is_subtype_of(Klass* k) const;
567
568 public:
569 // Find LCA in class hierarchy
570 Klass *LCA( Klass *k );
571
572 // Check whether reflection/jni/jvm code is allowed to instantiate this class;
573 // if not, throw either an Error or an Exception.
574 virtual void check_valid_for_instantiation(bool throwError, TRAPS);
575
576 // array copying
577 virtual void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS);
578
579 // tells if the class should be initialized
580 virtual bool should_be_initialized() const { return false; }
581 // initializes the klass
582 virtual void initialize(TRAPS);
583 virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const;
584 virtual Method* uncached_lookup_method(const Symbol* name, const Symbol* signature,
585 OverpassLookupMode overpass_mode,
586 PrivateLookupMode = PrivateLookupMode::find) const;
587 public:
588 Method* lookup_method(const Symbol* name, const Symbol* signature) const {
589 return uncached_lookup_method(name, signature, OverpassLookupMode::find);
590 }
591
592 // array class with specific rank
593 virtual ArrayKlass* array_klass(int rank, TRAPS) = 0;
594
595 // array class with this klass as element type
596 virtual ArrayKlass* array_klass(TRAPS) = 0;
597
598 // These will return null instead of allocating on the heap:
599 virtual ArrayKlass* array_klass_or_null(int rank) = 0;
600 virtual ArrayKlass* array_klass_or_null() = 0;
601
602 virtual oop protection_domain() const = 0;
|
563 bool is_subclass_of(const Klass* k) const;
564
565 // subtype check: true if is_subclass_of, or if k is interface and receiver implements it
566 bool is_subtype_of(Klass* k) const;
567
568 public:
569 // Find LCA in class hierarchy
570 Klass *LCA( Klass *k );
571
572 // Check whether reflection/jni/jvm code is allowed to instantiate this class;
573 // if not, throw either an Error or an Exception.
574 virtual void check_valid_for_instantiation(bool throwError, TRAPS);
575
576 // array copying
577 virtual void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS);
578
579 // tells if the class should be initialized
580 virtual bool should_be_initialized() const { return false; }
581 // initializes the klass
582 virtual void initialize(TRAPS);
583 virtual void initialize_preemptable(TRAPS);
584 virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const;
585 virtual Method* uncached_lookup_method(const Symbol* name, const Symbol* signature,
586 OverpassLookupMode overpass_mode,
587 PrivateLookupMode = PrivateLookupMode::find) const;
588 public:
589 Method* lookup_method(const Symbol* name, const Symbol* signature) const {
590 return uncached_lookup_method(name, signature, OverpassLookupMode::find);
591 }
592
593 // array class with specific rank
594 virtual ArrayKlass* array_klass(int rank, TRAPS) = 0;
595
596 // array class with this klass as element type
597 virtual ArrayKlass* array_klass(TRAPS) = 0;
598
599 // These will return null instead of allocating on the heap:
600 virtual ArrayKlass* array_klass_or_null(int rank) = 0;
601 virtual ArrayKlass* array_klass_or_null() = 0;
602
603 virtual oop protection_domain() const = 0;
|