< prev index next >
src/share/vm/classfile/moduleEntry.hpp
Print this page
@@ -1,7 +1,7 @@
/*
- * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2016, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
@@ -63,10 +63,11 @@
Symbol* _version; // module version number
Symbol* _location; // module location
bool _can_read_all_unnamed;
bool _has_default_read_edges; // JVMTI redefine/retransform support
bool _must_walk_reads; // walk module's reads list at GC safepoints to purge out dead modules
+ bool _is_open; // whether the packages in the module are all unqualifiedly exported
bool _is_patched; // whether the module is patched via --patch-module
TRACE_DEFINE_TRACE_ID_FIELD;
enum {MODULE_READS_SIZE = 101}; // Initial size of list of modules that the module can read.
public:
@@ -79,10 +80,11 @@
_location = NULL;
_can_read_all_unnamed = false;
_has_default_read_edges = false;
_must_walk_reads = false;
_is_patched = false;
+ _is_open = false;
}
Symbol* name() const { return literal(); }
void set_name(Symbol* n) { set_literal(n); }
@@ -110,10 +112,13 @@
bool can_read(ModuleEntry* m) const;
bool has_reads() const;
void add_read(ModuleEntry* m);
void set_read_walk_required(ClassLoaderData* m_loader_data);
+ bool is_open() const { return _is_open; }
+ void set_is_open(bool is_open);
+
bool is_named() const { return (name() != NULL); }
bool can_read_all_unnamed() const {
assert(is_named() || _can_read_all_unnamed == true,
"unnamed modules can always read all unnamed modules");
@@ -191,12 +196,12 @@
private:
static ModuleEntry* _javabase_module;
ModuleEntry* _unnamed_module;
- ModuleEntry* new_entry(unsigned int hash, Handle module_handle, Symbol* name, Symbol* version,
- Symbol* location, ClassLoaderData* loader_data);
+ ModuleEntry* new_entry(unsigned int hash, Handle module_handle, bool is_open,
+ Symbol* name, Symbol* version, Symbol* location, ClassLoaderData* loader_data);
void add_entry(int index, ModuleEntry* new_entry);
int entry_size() const { return BasicHashtable<mtModule>::entry_size(); }
ModuleEntry** bucket_addr(int i) {
@@ -215,10 +220,11 @@
}
// Create module in loader's module entry table, if already exists then
// return null. Assume Module_lock has been locked by caller.
ModuleEntry* locked_create_entry_or_null(Handle module_handle,
+ bool is_open,
Symbol* module_name,
Symbol* module_version,
Symbol* module_location,
ClassLoaderData* loader_data);
< prev index next >