< prev index next >
src/share/vm/classfile/packageEntry.hpp
Print this page
*** 126,136 ****
void set_module(ModuleEntry* m) { _module = m; }
// package's export state
bool is_exported() const { // qualifiedly or unqualifiedly exported
assert_locked_or_safepoint(Module_lock);
! return ((_export_flags & PKG_EXP_UNQUALIFIED_OR_ALL_UNAMED) != 0) || has_qual_exports_list();
}
// Returns true if the package has any explicit qualified exports or is exported to all unnamed
bool is_qual_exported() const {
assert_locked_or_safepoint(Module_lock);
return (has_qual_exports_list() || is_exported_allUnnamed());
--- 126,138 ----
void set_module(ModuleEntry* m) { _module = m; }
// package's export state
bool is_exported() const { // qualifiedly or unqualifiedly exported
assert_locked_or_safepoint(Module_lock);
! return module()->is_open() ||
! ((_export_flags & PKG_EXP_UNQUALIFIED_OR_ALL_UNAMED) != 0) ||
! has_qual_exports_list();
}
// Returns true if the package has any explicit qualified exports or is exported to all unnamed
bool is_qual_exported() const {
assert_locked_or_safepoint(Module_lock);
return (has_qual_exports_list() || is_exported_allUnnamed());
*** 143,162 ****
assert_locked_or_safepoint(Module_lock);
return (!is_unqual_exported() && _qualified_exports != NULL);
}
bool is_exported_allUnnamed() const {
assert_locked_or_safepoint(Module_lock);
! return (_export_flags == PKG_EXP_ALLUNNAMED);
}
bool is_unqual_exported() const {
assert_locked_or_safepoint(Module_lock);
! return (_export_flags == PKG_EXP_UNQUALIFIED);
}
// Explicitly set _export_flags to PKG_EXP_UNQUALIFIED and clear
// PKG_EXP_ALLUNNAMED, if it was set.
void set_unqual_exported() {
assert(Module_lock->owned_by_self(), "should have the Module_lock");
_export_flags = PKG_EXP_UNQUALIFIED;
}
bool exported_pending_delete() const;
--- 145,168 ----
assert_locked_or_safepoint(Module_lock);
return (!is_unqual_exported() && _qualified_exports != NULL);
}
bool is_exported_allUnnamed() const {
assert_locked_or_safepoint(Module_lock);
! return (module()->is_open() || _export_flags == PKG_EXP_ALLUNNAMED);
}
bool is_unqual_exported() const {
assert_locked_or_safepoint(Module_lock);
! return (module()->is_open() || _export_flags == PKG_EXP_UNQUALIFIED);
}
// Explicitly set _export_flags to PKG_EXP_UNQUALIFIED and clear
// PKG_EXP_ALLUNNAMED, if it was set.
void set_unqual_exported() {
+ if (module()->is_open()) {
+ // No-op for open modules since all packages are unqualifiedly exported
+ return;
+ }
assert(Module_lock->owned_by_self(), "should have the Module_lock");
_export_flags = PKG_EXP_UNQUALIFIED;
}
bool exported_pending_delete() const;
< prev index next >