362
363 // Returns true if this class loader data is for the platform class loader.
364 // (Note that the class loader data may be unsafe anonymous.)
365 bool is_platform_class_loader_data() const;
366
367 // Returns true if this class loader data is for the boot class loader.
368 // (Note that the class loader data may be unsafe anonymous.)
369 inline bool is_boot_class_loader_data() const;
370
371 bool is_builtin_class_loader_data() const;
372 bool is_permanent_class_loader_data() const;
373
374 // The Metaspace is created lazily so may be NULL. This
375 // method will allocate a Metaspace if needed.
376 ClassLoaderMetaspace* metaspace_non_null();
377
378 inline oop class_loader() const;
379
380 // Returns true if this class loader data is for a loader going away.
381 // Note that this is only safe after the GC has computed if the CLD is
382 // unloaded or not. In concurrent contexts where there are no such
383 // guarantees, is_alive() should be used instead.
384 bool is_unloading() const {
385 assert(!(is_the_null_class_loader_data() && _unloading), "The null class loader can never be unloaded");
386 return _unloading;
387 }
388
389 // Used to refcount an unsafe anonymous class's CLD in order to
390 // indicate their aliveness.
391 void inc_keep_alive();
392 void dec_keep_alive();
393
394 void initialize_holder(Handle holder);
395
396 void oops_do(OopClosure* f, bool must_claim, bool clear_modified_oops = false);
397
398 void classes_do(KlassClosure* klass_closure);
399 Klass* klasses() { return _klasses; }
400
401 JNIMethodBlock* jmethod_ids() const { return _jmethod_ids; }
|
362
363 // Returns true if this class loader data is for the platform class loader.
364 // (Note that the class loader data may be unsafe anonymous.)
365 bool is_platform_class_loader_data() const;
366
367 // Returns true if this class loader data is for the boot class loader.
368 // (Note that the class loader data may be unsafe anonymous.)
369 inline bool is_boot_class_loader_data() const;
370
371 bool is_builtin_class_loader_data() const;
372 bool is_permanent_class_loader_data() const;
373
374 // The Metaspace is created lazily so may be NULL. This
375 // method will allocate a Metaspace if needed.
376 ClassLoaderMetaspace* metaspace_non_null();
377
378 inline oop class_loader() const;
379
380 // Returns true if this class loader data is for a loader going away.
381 // Note that this is only safe after the GC has computed if the CLD is
382 // unloading or not. In concurrent contexts where there are no such
383 // guarantees, is_alive() should be used instead.
384 bool is_unloading() const {
385 assert(!(is_the_null_class_loader_data() && _unloading), "The null class loader can never be unloaded");
386 return _unloading;
387 }
388
389 // Used to refcount an unsafe anonymous class's CLD in order to
390 // indicate their aliveness.
391 void inc_keep_alive();
392 void dec_keep_alive();
393
394 void initialize_holder(Handle holder);
395
396 void oops_do(OopClosure* f, bool must_claim, bool clear_modified_oops = false);
397
398 void classes_do(KlassClosure* klass_closure);
399 Klass* klasses() { return _klasses; }
400
401 JNIMethodBlock* jmethod_ids() const { return _jmethod_ids; }
|