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 11 jdk.jlink.jmod - JLink Tool
JDK 11 jdk.jlink.jmod is the JMOD file for JDK 11 JLink tool,
which can be invoked by the "jlink" command.
JDK 11 JLink tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jlink.jmod.
JDK 11 JLink tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JLink tool source code files are stored in \fyicenter\jdk-11.0.1\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/ImageLocationWriter.java
/*
* Copyright (c) 2014, 2017, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.tools.jlink.internal;
import jdk.internal.jimage.ImageLocation;
import jdk.internal.jimage.ImageStream;
import jdk.internal.jimage.ImageStringsReader;
public final class ImageLocationWriter extends ImageLocation {
private int locationOffset;
private ImageLocationWriter(ImageStringsWriter strings) {
super(new long[ATTRIBUTE_COUNT], strings);
}
void writeTo(ImageStream stream) {
byte[] bytes = ImageLocation.compress(attributes);
locationOffset = stream.getPosition();
stream.put(bytes, 0, bytes.length);
}
private ImageLocationWriter addAttribute(int kind, long value) {
assert ATTRIBUTE_END < kind &&
kind < ATTRIBUTE_COUNT : "Invalid attribute kind";
attributes[kind] = value;
return this;
}
private ImageLocationWriter addAttribute(int kind, String value) {
return addAttribute(kind, strings.add(value));
}
static ImageLocationWriter newLocation(String fullName,
ImageStringsWriter strings,
long contentOffset, long compressedSize, long uncompressedSize) {
String moduleName = "";
String parentName = "";
String baseName;
String extensionName = "";
if (fullName.startsWith("/modules/")) {
moduleName = "modules";
baseName = fullName.substring("/modules/".length());
} else if ( fullName.startsWith("/packages/")) {
moduleName = "packages";
baseName = fullName.substring("/packages/".length());
} else {
int offset = fullName.indexOf('/', 1);
if (fullName.length() >= 2 && fullName.charAt(0) == '/' && offset != -1) {
moduleName = fullName.substring(1, offset);
fullName = fullName.substring(offset + 1);
}
offset = fullName.lastIndexOf('/');
if (1 < offset) {
parentName = fullName.substring(0, offset);
fullName = fullName.substring(offset + 1);
}
offset = fullName.lastIndexOf('.');
if (offset != -1) {
baseName = fullName.substring(0, offset);
extensionName = fullName.substring(offset + 1);
} else {
baseName = fullName;
}
}
return new ImageLocationWriter(strings)
.addAttribute(ATTRIBUTE_MODULE, moduleName)
.addAttribute(ATTRIBUTE_PARENT, parentName)
.addAttribute(ATTRIBUTE_BASE, baseName)
.addAttribute(ATTRIBUTE_EXTENSION, extensionName)
.addAttribute(ATTRIBUTE_OFFSET, contentOffset)
.addAttribute(ATTRIBUTE_COMPRESSED, compressedSize)
.addAttribute(ATTRIBUTE_UNCOMPRESSED, uncompressedSize);
}
@Override
public int hashCode() {
return hashCode(ImageStringsReader.HASH_MULTIPLIER);
}
int hashCode(int seed) {
int hash = seed;
if (getModuleOffset() != 0) {
hash = ImageStringsReader.unmaskedHashCode("/", hash);
hash = ImageStringsReader.unmaskedHashCode(getModule(), hash);
hash = ImageStringsReader.unmaskedHashCode("/", hash);
}
if (getParentOffset() != 0) {
hash = ImageStringsReader.unmaskedHashCode(getParent(), hash);
hash = ImageStringsReader.unmaskedHashCode("/", hash);
}
hash = ImageStringsReader.unmaskedHashCode(getBase(), hash);
if (getExtensionOffset() != 0) {
hash = ImageStringsReader.unmaskedHashCode(".", hash);
hash = ImageStringsReader.unmaskedHashCode(getExtension(), hash);
}
return hash & ImageStringsReader.POSITIVE_MASK;
}
@Override
public boolean equals(Object obj) {
if (this == obj) {
return true;
}
if (!(obj instanceof ImageLocationWriter)) {
return false;
}
ImageLocationWriter other = (ImageLocationWriter) obj;
return getModuleOffset() == other.getModuleOffset() &&
getParentOffset() == other.getParentOffset() &&
getBaseOffset() == other.getBaseOffset() &&
getExtensionOffset() == other.getExtensionOffset();
}
int getLocationOffset() {
return locationOffset;
}
}
⏎ jdk/tools/jlink/internal/ImageLocationWriter.java
Or download all of them as a single archive file:
File name: jdk.jlink-11.0.1-src.zip File size: 155677 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jshell.jmod - JShell Tool
2020-06-30, ≈41🔥, 0💬
Popular Posts:
What Is commons-io-2.11.jar? commons-io-2.11.jar is the JAR file for Commons IO 2.5, which is a libr...
GJT (Giant Java Tree) implementation of XML Pull Parser. JAR File Size and Download Location: File n...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...
What Is jsse.jar (JDK 6) Java Secure Socket Extension? jsse.jar, Java Secure Socket Extension, is Ja...
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...