720 // needed because we can't really get rid of jmethodIDs because we don't 721 // know when native code is going to stop using them. The spec says that 722 // they're "invalid" but existing programs likely rely on their being 723 // NULL after class unloading. 724 if (_jmethod_ids != NULL) { 725 Method::clear_jmethod_ids(this); 726 } 727 // Delete lock 728 delete _metaspace_lock; 729 730 // Delete free list 731 if (_deallocate_list != NULL) { 732 delete _deallocate_list; 733 } 734 } 735 736 // Returns true if this class loader data is for the app class loader 737 // or a user defined system class loader. (Note that the class loader 738 // data may be anonymous.) 739 bool ClassLoaderData::is_system_class_loader_data() const { 740 return SystemDictionary::is_system_class_loader(class_loader()); 741 } 742 743 // Returns true if this class loader data is for the platform class loader. 744 // (Note that the class loader data may be anonymous.) 745 bool ClassLoaderData::is_platform_class_loader_data() const { 746 return SystemDictionary::is_platform_class_loader(class_loader()); 747 } 748 749 // Returns true if the class loader for this class loader data is one of 750 // the 3 builtin (boot application/system or platform) class loaders, 751 // including a user-defined system class loader. Note that if the class 752 // loader data is for an anonymous class then it may get freed by a GC 753 // even if its class loader is one of these loaders. 754 bool ClassLoaderData::is_builtin_class_loader_data() const { 755 return (is_boot_class_loader_data() || 756 SystemDictionary::is_system_class_loader(class_loader()) || 757 SystemDictionary::is_platform_class_loader(class_loader())); 758 } 759 760 // Returns true if this class loader data is a class loader data 761 // that is not ever freed by a GC. It must be one of the builtin 762 // class loaders and not anonymous. 763 bool ClassLoaderData::is_permanent_class_loader_data() const { 764 return is_builtin_class_loader_data() && !is_anonymous(); 765 } 766 | 720 // needed because we can't really get rid of jmethodIDs because we don't 721 // know when native code is going to stop using them. The spec says that 722 // they're "invalid" but existing programs likely rely on their being 723 // NULL after class unloading. 724 if (_jmethod_ids != NULL) { 725 Method::clear_jmethod_ids(this); 726 } 727 // Delete lock 728 delete _metaspace_lock; 729 730 // Delete free list 731 if (_deallocate_list != NULL) { 732 delete _deallocate_list; 733 } 734 } 735 736 // Returns true if this class loader data is for the app class loader 737 // or a user defined system class loader. (Note that the class loader 738 // data may be anonymous.) 739 bool ClassLoaderData::is_system_class_loader_data() const { 740 return !is_anonymous() && SystemDictionary::is_system_class_loader(class_loader()); 741 } 742 743 // Returns true if this class loader data is for the platform class loader. 744 // (Note that the class loader data may be anonymous.) 745 bool ClassLoaderData::is_platform_class_loader_data() const { 746 return !is_anonymous() && SystemDictionary::is_platform_class_loader(class_loader()); 747 } 748 749 // Returns true if the class loader for this class loader data is one of 750 // the 3 builtin (boot application/system or platform) class loaders, 751 // including a user-defined system class loader. Note that if the class 752 // loader data is for an anonymous class then it may get freed by a GC 753 // even if its class loader is one of these loaders. 754 bool ClassLoaderData::is_builtin_class_loader_data() const { 755 return (is_boot_class_loader_data() || 756 SystemDictionary::is_system_class_loader(class_loader()) || 757 SystemDictionary::is_platform_class_loader(class_loader())); 758 } 759 760 // Returns true if this class loader data is a class loader data 761 // that is not ever freed by a GC. It must be one of the builtin 762 // class loaders and not anonymous. 763 bool ClassLoaderData::is_permanent_class_loader_data() const { 764 return is_builtin_class_loader_data() && !is_anonymous(); 765 } 766 |