Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (102)
JavaBeans (21)
JDBC (121)
JDK (426)
JSP (20)
Logging (108)
Mail (58)
Messaging (8)
Network (84)
PDF (97)
Report (7)
Scripting (84)
Security (32)
Server (121)
Servlet (26)
SOAP (24)
Testing (54)
Web (15)
XML (322)
Collections:
Other Resources:
JDK 17 jdk.jlink.jmod - JLink Tool
JDK 17 jdk.jlink.jmod is the JMOD file for JDK 17 JLink tool,
which can be invoked by the "jlink" command.
JDK 17 JLink tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jlink.jmod.
JDK 17 JLink tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JLink tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jlink.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/tools/jlink/internal/ResourcePoolConfiguration.java
/*
* Copyright (c) 2016, 2020, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.tools.jlink.internal;
import java.lang.module.Configuration;
import java.lang.module.ModuleDescriptor;
import java.lang.module.ModuleFinder;
import java.lang.module.ModuleReader;
import java.lang.module.ModuleReference;
import java.util.HashSet;
import java.util.Map;
import java.util.Optional;
import java.util.Set;
import java.util.stream.Collectors;
import jdk.tools.jlink.plugin.ResourcePool;
import jdk.tools.jlink.plugin.ResourcePoolModule;
final class ResourcePoolConfiguration {
private ResourcePoolConfiguration() {}
private static ModuleDescriptor descriptorOf(ResourcePoolModule mod) {
ModuleDescriptor md = mod.descriptor();
// drop hashes
ModuleDescriptor.Builder builder = ModuleDescriptor.newModule(md.name());
md.requires().stream()
.forEach(builder::requires);
md.exports().stream()
.forEach(builder::exports);
md.opens().stream()
.forEach(builder::opens);
md.uses().stream()
.forEach(builder::uses);
md.provides().stream()
.forEach(builder::provides);
builder.packages(md.packages());
md.version().ifPresent(builder::version);
md.mainClass().ifPresent(builder::mainClass);
return builder.build();
}
private static ModuleReference moduleReference(ModuleDescriptor desc) {
return new ModuleReference(desc, null) {
@Override
public ModuleReader open() {
throw new UnsupportedOperationException();
}
};
}
private static Map<String, ModuleReference> allModRefs(ResourcePool pool) {
return pool.moduleView().modules().
collect(Collectors.toMap(ResourcePoolModule::name,
m -> moduleReference(descriptorOf(m))));
}
private static void checkPackages(ResourcePool pool) {
// check that each resource pool module's packages()
// returns a set that is consistent with the module
// descriptor of that module.
pool.moduleView().modules().forEach(m -> {
ModuleDescriptor desc = m.descriptor();
if (!desc.packages().equals(m.packages())) {
throw new RuntimeException("Module " + m.name() +
"'s descriptor indicates the set of packages is : " +
desc.packages() + ", but module contains packages: " +
m.packages());
}
});
}
static Configuration validate(ResourcePool pool) {
checkPackages(pool);
final Map<String, ModuleReference> nameToModRef = allModRefs(pool);
final Set<ModuleReference> allRefs = new HashSet<>(nameToModRef.values());
final ModuleFinder finder = new ModuleFinder() {
@Override
public Optional<ModuleReference> find(String name) {
return Optional.ofNullable(nameToModRef.get(name));
}
@Override
public Set<ModuleReference> findAll() {
return allRefs;
}
};
return Configuration.empty().resolve(
finder, ModuleFinder.of(), nameToModRef.keySet());
}
}
⏎ jdk/tools/jlink/internal/ResourcePoolConfiguration.java
Or download all of them as a single archive file:
File name: jdk.jlink-17.0.5-src.zip File size: 164180 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jpackage.jmod - JPackage Tool
2023-08-03, ≈36🔥, 0💬
Popular Posts:
Java-WebSocket Source Code Files are provided in the source package file, java-websocket-1.5.4-src .z...
What Is poi-5.2.3.jar? poi-5.2.3.jar is one of the JAR files for Apache POI 5.2.3, which provides an...
What Is commons-logging-1.2.jar? commons-logging-1.2.jar is the JAR file for Apache Commons Logging ...
JDK 17 jdk.charsets.jmod is the JMOD file for JDK 17 Charsets module. JDK 17 Charsets module compile...
Apache Log4j 1.2 Bridge allows applications coded to use Log4j 1.2 API to use Log4j 2 instead. Bytec...