< prev index next >

src/share/vm/oops/constantPool.hpp

Print this page




 706   }
 707 
 708   oop resolve_bootstrap_specifier_at(int index, TRAPS) {
 709     constantPoolHandle h_this(THREAD, this);
 710     return resolve_bootstrap_specifier_at_impl(h_this, index, THREAD);
 711   }
 712 
 713   // Klass name matches name at offset
 714   bool klass_name_at_matches(instanceKlassHandle k, int which);
 715 
 716   // Sizing
 717   int length() const                   { return _length; }
 718   void set_length(int length)          { _length = length; }
 719 
 720   // Tells whether index is within bounds.
 721   bool is_within_bounds(int index) const {
 722     return 0 <= index && index < length();
 723   }
 724 
 725   // Sizing (in words)
 726   static int header_size()             { return sizeof(ConstantPool)/HeapWordSize; }
 727   static int size(int length)          { return align_object_size(header_size() + length); }
 728   int size() const                     { return size(length()); }
 729 #if INCLUDE_SERVICES
 730   void collect_statistics(KlassSizeStats *sz) const;
 731 #endif
 732 
 733   friend class ClassFileParser;
 734   friend class SystemDictionary;
 735 
 736   // Used by compiler to prevent classloading.
 737   static Method*          method_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 738   static bool       has_appendix_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 739   static oop            appendix_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 740   static bool    has_method_type_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 741   static oop         method_type_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 742   static Klass*            klass_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 743   static Klass*        klass_ref_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 744 
 745   // Routines currently used for annotations (only called by jvm.cpp) but which might be used in the
 746   // future by other Java code. These take constant pool indices rather than
 747   // constant pool cache indices as do the peer methods above.




 706   }
 707 
 708   oop resolve_bootstrap_specifier_at(int index, TRAPS) {
 709     constantPoolHandle h_this(THREAD, this);
 710     return resolve_bootstrap_specifier_at_impl(h_this, index, THREAD);
 711   }
 712 
 713   // Klass name matches name at offset
 714   bool klass_name_at_matches(instanceKlassHandle k, int which);
 715 
 716   // Sizing
 717   int length() const                   { return _length; }
 718   void set_length(int length)          { _length = length; }
 719 
 720   // Tells whether index is within bounds.
 721   bool is_within_bounds(int index) const {
 722     return 0 <= index && index < length();
 723   }
 724 
 725   // Sizing (in words)
 726   static int header_size()             { return sizeof(ConstantPool)/wordSize; }
 727   static int size(int length)          { return align_metadata_size(header_size() + length); }
 728   int size() const                     { return size(length()); }
 729 #if INCLUDE_SERVICES
 730   void collect_statistics(KlassSizeStats *sz) const;
 731 #endif
 732 
 733   friend class ClassFileParser;
 734   friend class SystemDictionary;
 735 
 736   // Used by compiler to prevent classloading.
 737   static Method*          method_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 738   static bool       has_appendix_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 739   static oop            appendix_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 740   static bool    has_method_type_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 741   static oop         method_type_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 742   static Klass*            klass_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 743   static Klass*        klass_ref_at_if_loaded      (const constantPoolHandle& this_cp, int which);
 744 
 745   // Routines currently used for annotations (only called by jvm.cpp) but which might be used in the
 746   // future by other Java code. These take constant pool indices rather than
 747   // constant pool cache indices as do the peer methods above.


< prev index next >