8169069: Module system implementation refresh (11/2016)

Co-authored-by: Lois Foltan <lois.foltan@oracle.com>
Co-authored-by: Harold Seigel <harold.seigel@oracle.com>
Co-authored-by: Mandy Chung <mandy.chung@oracle.com>
Co-authored-by: Serguei Spitsyn <serguei.spitsyn@oracle.com>
Co-authored-by: George Triantafillou <george.triantafillou@oracle.com>
Reviewed-by: lfoltan, acorn, ctornqvi, mchung
This commit is contained in:
Alan Bateman 2016-12-01 08:56:41 +00:00
parent 16734f37d5
commit 988690303a
110 changed files with 1885 additions and 773 deletions

View file

@ -73,17 +73,6 @@ public class ModuleHelper {
java.lang.reflect.ModuleHelper.addExportsNoSync((Module)m, pkg, (Module)null);
}
public static boolean CanReadModule(Object from, Object to) throws Throwable {
WhiteBox wb = WhiteBox.getWhiteBox();
return wb.CanReadModule(from, to);
}
public static boolean IsExportedToModule(Object from, String pkg,
Object to) throws Throwable {
WhiteBox wb = WhiteBox.getWhiteBox();
return wb.IsExportedToModule(from, pkg, to);
}
public static Module ModuleObject(String name, ClassLoader loader, String[] pkgs) throws Throwable {
Set<String> pkg_set = new HashSet<>();
if (pkgs != null) {
@ -95,7 +84,7 @@ public class ModuleHelper {
}
ModuleDescriptor descriptor =
new ModuleDescriptor.Builder(name).conceals(pkg_set).build();
ModuleDescriptor.module(name).contains(pkg_set).build();
URI uri = URI.create("module:/" + name);
return java.lang.reflect.ModuleHelper.newModule(loader, descriptor);