Categories:
Audio (13)
Biotech (29)
Bytecode (36)
Database (77)
Framework (7)
Game (7)
General (507)
Graphics (53)
I/O (35)
IDE (2)
JAR Tools (101)
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 (309)
Collections:
Other Resources:
JDK 17 jdk.jshell.jmod - JShell Tool
JDK 17 jdk.jshell.jmod is the JMOD file for JDK 17 JShell tool, which can be invoked by the "jshell" command.
JDK 17 JShell tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jshell.jmod.
JDK 17 JShell tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JShell tool source code files are stored in \fyicenter\jdk-17.0.5\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-17.0.5-src.zip File size: 302589 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jsobject.jmod - JS Object Module
2023-08-03, 5910👍, 0💬
Popular Posts:
XOM™ is a new XML object model. It is an open source (LGPL), tree-based API for processing XML with ...
maven-core-3.5.4.jar is the JAR file for Apache Maven 3.5.4 Core module. Apache Maven is a software ...
commons-io-1.4.jar is the JAR file for Commons IO 1.4, which is a library of utilities to assist wit...
SLF4J API is a simple API that allows to plug in any desired logging library at deployment time. Her...
The Java Naming and Directory Interface (JNDI) is part of the Java platform, providing applications ...