< prev index next >

src/share/vm/services/classLoadingService.hpp

Print this page




 124   // _current_thread is for creating a KlassHandle with a faster version constructor
 125   static Thread*                     _current_thread;
 126 
 127   GrowableArray<KlassHandle>* _klass_handle_array;
 128 
 129 public:
 130   LoadedClassesEnumerator(Thread* cur_thread);
 131 
 132   int num_loaded_classes()         { return _klass_handle_array->length(); }
 133   KlassHandle get_klass(int index) { return _klass_handle_array->at(index); }
 134 
 135   static void add_loaded_class(Klass* k) {
 136     // FIXME: For now - don't include array klasses
 137     // The spec is unclear at this point to count array klasses or not
 138     // and also indirect creation of array of super class and secondaries
 139     //
 140     // for (Klass* l = k; l != NULL; l = l->array_klass_or_null()) {
 141     //  KlassHandle h(_current_thread, l);
 142     //  _loaded_classes->append(h);
 143     // }

 144     KlassHandle h(_current_thread, k);
 145     _loaded_classes->append(h);

 146   }
 147 };
 148 
 149 #endif // SHARE_VM_SERVICES_CLASSLOADINGSERVICE_HPP


 124   // _current_thread is for creating a KlassHandle with a faster version constructor
 125   static Thread*                     _current_thread;
 126 
 127   GrowableArray<KlassHandle>* _klass_handle_array;
 128 
 129 public:
 130   LoadedClassesEnumerator(Thread* cur_thread);
 131 
 132   int num_loaded_classes()         { return _klass_handle_array->length(); }
 133   KlassHandle get_klass(int index) { return _klass_handle_array->at(index); }
 134 
 135   static void add_loaded_class(Klass* k) {
 136     // FIXME: For now - don't include array klasses
 137     // The spec is unclear at this point to count array klasses or not
 138     // and also indirect creation of array of super class and secondaries
 139     //
 140     // for (Klass* l = k; l != NULL; l = l->array_klass_or_null()) {
 141     //  KlassHandle h(_current_thread, l);
 142     //  _loaded_classes->append(h);
 143     // }
 144     if (k->is_instance_klass()) {
 145       KlassHandle h(_current_thread, k);
 146       _loaded_classes->append(h);
 147     }
 148   }
 149 };
 150 
 151 #endif // SHARE_VM_SERVICES_CLASSLOADINGSERVICE_HPP
< prev index next >