< prev index next >

src/jdk.jdeps/share/classes/com/sun/tools/jdeps/Module.java

Print this page

        

*** 56,71 **** private final Map<String, Set<String>> opens; private final boolean isSystem; private final URI location; protected Module(String name) { super(name); ! this.descriptor = null; this.location = null; this.exports = Collections.emptyMap(); this.opens = Collections.emptyMap(); ! this.isSystem = true; } private Module(String name, URI location, ModuleDescriptor descriptor, --- 56,75 ---- private final Map<String, Set<String>> opens; private final boolean isSystem; private final URI location; protected Module(String name) { + this(name, null, false); + } + + protected Module(String name, ModuleDescriptor descriptor, boolean isSystem) { super(name); ! this.descriptor = descriptor; this.location = null; this.exports = Collections.emptyMap(); this.opens = Collections.emptyMap(); ! this.isSystem = isSystem; } private Module(String name, URI location, ModuleDescriptor descriptor,
*** 87,101 **** public String name() { return descriptor != null ? descriptor.name() : getName(); } public boolean isNamed() { ! return true; } public boolean isAutomatic() { ! return descriptor.isAutomatic(); } public Module getModule() { return this; } --- 91,105 ---- public String name() { return descriptor != null ? descriptor.name() : getName(); } public boolean isNamed() { ! return descriptor != null; } public boolean isAutomatic() { ! return descriptor != null && descriptor.isAutomatic(); } public Module getModule() { return this; }
*** 230,260 **** } } private static class UnnamedModule extends Module { private UnnamedModule() { ! super("unnamed", null, null, ! Collections.emptyMap(), Collections.emptyMap(), ! false, null); } @Override public String name() { return "unnamed"; } @Override - public boolean isNamed() { - return false; - } - - @Override - public boolean isAutomatic() { - return false; - } - - @Override public boolean isExported(String pn) { return true; } } --- 234,252 ---- } } private static class UnnamedModule extends Module { private UnnamedModule() { ! super("unnamed", null, false); } @Override public String name() { return "unnamed"; } @Override public boolean isExported(String pn) { return true; } }
< prev index next >