< prev index next >

src/share/vm/classfile/packageEntry.hpp

Print this page




 111 
 112 public:
 113   void init() {
 114     _module = NULL;
 115     _export_flags = 0;
 116     _classpath_index = -1;
 117     _must_walk_exports = false;
 118     _qualified_exports = NULL;
 119   }
 120 
 121   // package name
 122   Symbol*            name() const               { return literal(); }
 123 
 124   // the module containing the package definition
 125   ModuleEntry*       module() const             { return _module; }
 126   void               set_module(ModuleEntry* m) { _module = m; }
 127 
 128   // package's export state
 129   bool is_exported() const { // qualifiedly or unqualifiedly exported
 130     assert_locked_or_safepoint(Module_lock);
 131     return ((_export_flags & PKG_EXP_UNQUALIFIED_OR_ALL_UNAMED) != 0) || has_qual_exports_list();


 132   }
 133   // Returns true if the package has any explicit qualified exports or is exported to all unnamed
 134   bool is_qual_exported() const {
 135     assert_locked_or_safepoint(Module_lock);
 136     return (has_qual_exports_list() || is_exported_allUnnamed());
 137   }
 138   // Returns true if there are any explicit qualified exports.  Note that even
 139   // if the _qualified_exports list is now empty (because the modules that were
 140   // on the list got gc-ed and deleted from the list) this method may still
 141   // return true.
 142   bool has_qual_exports_list() const {
 143     assert_locked_or_safepoint(Module_lock);
 144     return (!is_unqual_exported() && _qualified_exports != NULL);
 145   }
 146   bool is_exported_allUnnamed() const {
 147     assert_locked_or_safepoint(Module_lock);
 148     return (_export_flags == PKG_EXP_ALLUNNAMED);
 149   }
 150   bool is_unqual_exported() const {
 151     assert_locked_or_safepoint(Module_lock);
 152     return (_export_flags == PKG_EXP_UNQUALIFIED);
 153   }
 154 
 155   // Explicitly set _export_flags to PKG_EXP_UNQUALIFIED and clear
 156   // PKG_EXP_ALLUNNAMED, if it was set.
 157   void set_unqual_exported() {
 158     assert(Module_lock->owned_by_self(), "should have the Module_lock");
 159     _export_flags = PKG_EXP_UNQUALIFIED;
 160   }
 161 
 162   bool exported_pending_delete() const;
 163 
 164   void set_exported(ModuleEntry* m);
 165 
 166   void set_is_exported_allUnnamed();
 167 
 168   void set_classpath_index(s2 classpath_index) {
 169     _classpath_index = classpath_index;
 170   }
 171   s2 classpath_index() const { return _classpath_index; }
 172 




 111 
 112 public:
 113   void init() {
 114     _module = NULL;
 115     _export_flags = 0;
 116     _classpath_index = -1;
 117     _must_walk_exports = false;
 118     _qualified_exports = NULL;
 119   }
 120 
 121   // package name
 122   Symbol*            name() const               { return literal(); }
 123 
 124   // the module containing the package definition
 125   ModuleEntry*       module() const             { return _module; }
 126   void               set_module(ModuleEntry* m) { _module = m; }
 127 
 128   // package's export state
 129   bool is_exported() const { // qualifiedly or unqualifiedly exported
 130     assert_locked_or_safepoint(Module_lock);
 131     return module()->is_open() ||
 132             ((_export_flags & PKG_EXP_UNQUALIFIED_OR_ALL_UNAMED) != 0) ||
 133             has_qual_exports_list();
 134   }
 135   // Returns true if the package has any explicit qualified exports or is exported to all unnamed
 136   bool is_qual_exported() const {
 137     assert_locked_or_safepoint(Module_lock);
 138     return (has_qual_exports_list() || is_exported_allUnnamed());
 139   }
 140   // Returns true if there are any explicit qualified exports.  Note that even
 141   // if the _qualified_exports list is now empty (because the modules that were
 142   // on the list got gc-ed and deleted from the list) this method may still
 143   // return true.
 144   bool has_qual_exports_list() const {
 145     assert_locked_or_safepoint(Module_lock);
 146     return (!is_unqual_exported() && _qualified_exports != NULL);
 147   }
 148   bool is_exported_allUnnamed() const {
 149     assert_locked_or_safepoint(Module_lock);
 150     return (_export_flags == PKG_EXP_ALLUNNAMED);
 151   }
 152   bool is_unqual_exported() const {
 153     assert_locked_or_safepoint(Module_lock);
 154     return module()->is_open() || (_export_flags == PKG_EXP_UNQUALIFIED);
 155   }
 156 
 157   // Explicitly set _export_flags to PKG_EXP_UNQUALIFIED and clear
 158   // PKG_EXP_ALLUNNAMED, if it was set.
 159   void set_unqual_exported() {
 160     assert(Module_lock->owned_by_self(), "should have the Module_lock");
 161     _export_flags = PKG_EXP_UNQUALIFIED;
 162   }
 163 
 164   bool exported_pending_delete() const;
 165 
 166   void set_exported(ModuleEntry* m);
 167 
 168   void set_is_exported_allUnnamed();
 169 
 170   void set_classpath_index(s2 classpath_index) {
 171     _classpath_index = classpath_index;
 172   }
 173   s2 classpath_index() const { return _classpath_index; }
 174 


< prev index next >