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.jshell.jmod - JShell Tool
JDK 11 jdk.jshell.jmod is the JMOD file for JDK 11 JShell tool,
which can be invoked by the "jshell" command.
JDK 11 JShell tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jshell.jmod.
JDK 11 JShell tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JShell tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jshell.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/jshell/ClassTracker.java
/*
* Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package jdk.jshell;
import java.util.Arrays;
import java.util.HashMap;
import java.util.Objects;
import jdk.jshell.spi.ExecutionControl.ClassBytecodes;
/**
* Tracks the state of a class.
*/
class ClassTracker {
private final HashMap<String, ClassInfo> map;
ClassTracker() {
this.map = new HashMap<>();
}
/**
* Associates a class name, class bytes (current and loaded).
*/
class ClassInfo {
// The name of the class
private final String className;
// The corresponding compiled class bytes when a load or redefine
// is started. May not be the loaded bytes. May be null.
private byte[] currentBytes;
// The class bytes successfully loaded/redefined into the remote VM.
private byte[] loadedBytes;
private ClassInfo(String className) {
this.className = className;
}
String getClassName() {
return className;
}
byte[] getLoadedBytes() {
return loadedBytes;
}
byte[] getCurrentBytes() {
return currentBytes;
}
void setCurrentBytes(byte[] bytes) {
this.currentBytes = bytes;
}
void setLoadedBytes(byte[] bytes) {
this.loadedBytes = bytes;
}
boolean isLoaded() {
return loadedBytes != null;
}
boolean isCurrent() {
return Arrays.equals(currentBytes, loadedBytes);
}
ClassBytecodes toClassBytecodes() {
return new ClassBytecodes(className, currentBytes);
}
@Override
public boolean equals(Object o) {
return o instanceof ClassInfo
&& ((ClassInfo) o).className.equals(className);
}
@Override
public int hashCode() {
return Objects.hashCode(this.className);
}
}
void markLoaded(ClassBytecodes[] cbcs) {
for (ClassBytecodes cbc : cbcs) {
get(cbc.name()).setLoadedBytes(cbc.bytecodes());
}
}
void markLoaded(ClassBytecodes[] cbcs, boolean[] isLoaded) {
for (int i = 0; i < cbcs.length; ++i) {
if (isLoaded[i]) {
ClassBytecodes cbc = cbcs[i];
get(cbc.name()).setLoadedBytes(cbc.bytecodes());
}
}
}
// Map a class name to the current compiled class bytes.
void setCurrentBytes(String className, byte[] bytes) {
ClassInfo ci = get(className);
ci.setCurrentBytes(bytes);
}
// Lookup the ClassInfo by class name, create if it does not exist.
ClassInfo get(String className) {
return map.computeIfAbsent(className, ClassInfo::new);
}
}
⏎ jdk/jshell/ClassTracker.java
Or download all of them as a single archive file:
File name: jdk.jshell-11.0.1-src.zip File size: 283093 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jsobject.jmod - JS Object Module
2020-06-30, ≈43🔥, 0💬
Popular Posts:
Java Cryptography Extension 1.6 JAR File Size and Download Location: File name: jce.jar, jce-1.6.jar...
Commons Pool provides an Object-pooling API, with three major aspects: 1. A generic object pool inte...
Jackson is "the Java JSON library" or "the best JSON parser for Java". Or simply as "JSON for Java"....
What Is HttpComponents httpcore-4.2.2.jar? HttpComponents httpcore-4.2.2.jar is the JAR file for Apa...
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...