< prev index next >
src/java.base/share/classes/jdk/internal/module/ModuleReferenceImpl.java
Print this page
@@ -44,10 +44,13 @@
private final Supplier<ModuleReader> readerSupplier;
// non-null if the module is patched
private final ModulePatcher patcher;
+ // ModuleTarget if the module is OS/architecture specific
+ private final ModuleTarget target;
+
// the hashes of other modules recorded in this module
private final ModuleHashes recordedHashes;
// the function that computes the hash of this module
private final ModuleHashes.HashSupplier hasher;
@@ -63,17 +66,19 @@
*/
ModuleReferenceImpl(ModuleDescriptor descriptor,
URI location,
Supplier<ModuleReader> readerSupplier,
ModulePatcher patcher,
+ ModuleTarget target,
ModuleHashes recordedHashes,
ModuleHashes.HashSupplier hasher,
ModuleResolution moduleResolution)
{
super(descriptor, Objects.requireNonNull(location));
this.readerSupplier = readerSupplier;
this.patcher = patcher;
+ this.target = target;
this.recordedHashes = recordedHashes;
this.hasher = hasher;
this.moduleResolution = moduleResolution;
}
@@ -92,10 +97,17 @@
public boolean isPatched() {
return (patcher != null);
}
/**
+ * Returns the ModuleTarget or {@code null} if the no target platform.
+ */
+ public ModuleTarget moduleTarget() {
+ return target;
+ }
+
+ /**
* Returns the hashes recorded in this module or {@code null} if there
* are no hashes recorded.
*/
public ModuleHashes recordedHashes() {
return recordedHashes;
< prev index next >