540 bool is_subclass_of(const Klass* k) const;
541
542 // subtype check: true if is_subclass_of, or if k is interface and receiver implements it
543 bool is_subtype_of(Klass* k) const;
544
545 public:
546 // Find LCA in class hierarchy
547 Klass *LCA( Klass *k );
548
549 // Check whether reflection/jni/jvm code is allowed to instantiate this class;
550 // if not, throw either an Error or an Exception.
551 virtual void check_valid_for_instantiation(bool throwError, TRAPS);
552
553 // array copying
554 virtual void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS);
555
556 // tells if the class should be initialized
557 virtual bool should_be_initialized() const { return false; }
558 // initializes the klass
559 virtual void initialize(TRAPS);
560 virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const;
561 virtual Method* uncached_lookup_method(const Symbol* name, const Symbol* signature,
562 OverpassLookupMode overpass_mode,
563 PrivateLookupMode = PrivateLookupMode::find) const;
564 public:
565 Method* lookup_method(const Symbol* name, const Symbol* signature) const {
566 return uncached_lookup_method(name, signature, OverpassLookupMode::find);
567 }
568
569 // array class with specific rank
570 virtual ArrayKlass* array_klass(int rank, TRAPS) = 0;
571
572 // array class with this klass as element type
573 virtual ArrayKlass* array_klass(TRAPS) = 0;
574
575 // These will return null instead of allocating on the heap:
576 virtual ArrayKlass* array_klass_or_null(int rank) = 0;
577 virtual ArrayKlass* array_klass_or_null() = 0;
578
579 virtual oop protection_domain() const = 0;
|
540 bool is_subclass_of(const Klass* k) const;
541
542 // subtype check: true if is_subclass_of, or if k is interface and receiver implements it
543 bool is_subtype_of(Klass* k) const;
544
545 public:
546 // Find LCA in class hierarchy
547 Klass *LCA( Klass *k );
548
549 // Check whether reflection/jni/jvm code is allowed to instantiate this class;
550 // if not, throw either an Error or an Exception.
551 virtual void check_valid_for_instantiation(bool throwError, TRAPS);
552
553 // array copying
554 virtual void copy_array(arrayOop s, int src_pos, arrayOop d, int dst_pos, int length, TRAPS);
555
556 // tells if the class should be initialized
557 virtual bool should_be_initialized() const { return false; }
558 // initializes the klass
559 virtual void initialize(TRAPS);
560 virtual void initialize_preemptable(TRAPS);
561 virtual Klass* find_field(Symbol* name, Symbol* signature, fieldDescriptor* fd) const;
562 virtual Method* uncached_lookup_method(const Symbol* name, const Symbol* signature,
563 OverpassLookupMode overpass_mode,
564 PrivateLookupMode = PrivateLookupMode::find) const;
565 public:
566 Method* lookup_method(const Symbol* name, const Symbol* signature) const {
567 return uncached_lookup_method(name, signature, OverpassLookupMode::find);
568 }
569
570 // array class with specific rank
571 virtual ArrayKlass* array_klass(int rank, TRAPS) = 0;
572
573 // array class with this klass as element type
574 virtual ArrayKlass* array_klass(TRAPS) = 0;
575
576 // These will return null instead of allocating on the heap:
577 virtual ArrayKlass* array_klass_or_null(int rank) = 0;
578 virtual ArrayKlass* array_klass_or_null() = 0;
579
580 virtual oop protection_domain() const = 0;
|