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.jdi.jmod - JDI Tool
JDK 17 jdk.jdi.jmod is the JMOD file for JDK 17 JDI (Java Debug Interface) tool.
JDK 17 JDI tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.jdi.jmod.
JDK 17 JDI tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 JDI tool source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.jdi.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/jdi/JNITypeParser.java
/* * Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.tools.jdi; import java.util.ArrayList; import java.util.List; public class JNITypeParser { static final char SIGNATURE_ENDCLASS = ';'; static final char SIGNATURE_FUNC = '('; static final char SIGNATURE_ENDFUNC = ')'; private String signature; private List<String> typeNameList; private List<String> signatureList; private int currentIndex; JNITypeParser(String signature) { this.signature = signature; } static String typeNameToSignature(String typeName) { StringBuilder sb = new StringBuilder(); int firstIndex = typeName.indexOf('['); int index = firstIndex; while (index != -1) { sb.append('['); index = typeName.indexOf('[', index + 1); } if (firstIndex != -1) { typeName = typeName.substring(0, firstIndex); } if (typeName.equals("boolean")) { sb.append('Z'); } else if (typeName.equals("byte")) { sb.append('B'); } else if (typeName.equals("char")) { sb.append('C'); } else if (typeName.equals("short")) { sb.append('S'); } else if (typeName.equals("int")) { sb.append('I'); } else if (typeName.equals("long")) { sb.append('J'); } else if (typeName.equals("float")) { sb.append('F'); } else if (typeName.equals("double")) { sb.append('D'); } else { sb.append('L'); index = typeName.indexOf("/"); // check if it's a hidden class if (index < 0) { sb.append(typeName.replace('.', '/')); } else { sb.append(typeName.substring(0, index).replace('.', '/')); sb.append("."); sb.append(typeName.substring(index + 1)); } sb.append(';'); } return sb.toString(); } String typeName() { return typeNameList().get(typeNameList().size()-1); } List<String> argumentTypeNames() { return typeNameList().subList(0, typeNameList().size() - 1); } String signature() { return signatureList().get(signatureList().size()-1); } List<String> argumentSignatures() { return signatureList().subList(0, signatureList().size() - 1); } int dimensionCount() { int count = 0; String signature = signature(); while (signature.charAt(count) == '[') { count++; } return count; } byte jdwpTag() { return (byte) signature().charAt(0); } String componentSignature(int level) { assert level <= dimensionCount(); return signature().substring(level); } String componentSignature() { assert isArray(); return componentSignature(1); } boolean isArray() { return jdwpTag() == JDWP.Tag.ARRAY; } boolean isVoid() { return jdwpTag() == JDWP.Tag.VOID; } boolean isBoolean() { return jdwpTag() == JDWP.Tag.BOOLEAN; } boolean isReference() { byte tag = jdwpTag(); return tag == JDWP.Tag.ARRAY || tag == JDWP.Tag.OBJECT; } boolean isPrimitive() { switch (jdwpTag()) { case (JDWP.Tag.BOOLEAN): case (JDWP.Tag.BYTE): case (JDWP.Tag.CHAR): case (JDWP.Tag.SHORT): case (JDWP.Tag.INT): case (JDWP.Tag.LONG): case (JDWP.Tag.FLOAT): case (JDWP.Tag.DOUBLE): return true; } return false; } static String convertSignatureToClassname(String classSignature) { assert classSignature.startsWith("L") && classSignature.endsWith(";"); // trim leading "L" and trailing ";" String name = classSignature.substring(1, classSignature.length() - 1); int index = name.indexOf("."); // check if it is a hidden class if (index < 0) { return name.replace('/', '.'); } else { // map the type descriptor from: "L" + N + "." + <suffix> + ";" // to class name: N.replace('/', '.') + "/" + <suffix> return name.substring(0, index).replace('/', '.') + "/" + name.substring(index + 1); } } private synchronized List<String> signatureList() { if (signatureList == null) { signatureList = new ArrayList<>(10); String elem; currentIndex = 0; while(currentIndex < signature.length()) { elem = nextSignature(); signatureList.add(elem); } if (signatureList.size() == 0) { throw new IllegalArgumentException("Invalid JNI signature '" + signature + "'"); } } return signatureList; } private synchronized List<String> typeNameList() { if (typeNameList == null) { typeNameList = new ArrayList<>(10); String elem; currentIndex = 0; while(currentIndex < signature.length()) { elem = nextTypeName(); typeNameList.add(elem); } if (typeNameList.size() == 0) { throw new IllegalArgumentException("Invalid JNI signature '" + signature + "'"); } } return typeNameList; } private String nextSignature() { char key = signature.charAt(currentIndex++); switch(key) { case (JDWP.Tag.ARRAY): return key + nextSignature(); case (JDWP.Tag.OBJECT): int endClass = signature.indexOf(SIGNATURE_ENDCLASS, currentIndex); String retVal = signature.substring(currentIndex - 1, endClass + 1); currentIndex = endClass + 1; return retVal; case (JDWP.Tag.VOID): case (JDWP.Tag.BOOLEAN): case (JDWP.Tag.BYTE): case (JDWP.Tag.CHAR): case (JDWP.Tag.SHORT): case (JDWP.Tag.INT): case (JDWP.Tag.LONG): case (JDWP.Tag.FLOAT): case (JDWP.Tag.DOUBLE): return String.valueOf(key); case SIGNATURE_ENDFUNC: case SIGNATURE_FUNC: return nextSignature(); default: throw new IllegalArgumentException( "Invalid JNI signature character '" + key + "'"); } } private String nextTypeName() { char key = signature.charAt(currentIndex++); switch(key) { case (JDWP.Tag.ARRAY): return nextTypeName() + "[]"; case (JDWP.Tag.BYTE): return "byte"; case (JDWP.Tag.CHAR): return "char"; case (JDWP.Tag.OBJECT): int endClass = signature.indexOf(SIGNATURE_ENDCLASS, currentIndex); String retVal = signature.substring(currentIndex, endClass); int index = retVal.indexOf("."); if (index < 0) { retVal = retVal.replace('/', '.'); } else { // hidden class retVal = retVal.substring(0, index).replace('/', '.') + "/" + retVal.substring(index + 1); } currentIndex = endClass + 1; return retVal; case (JDWP.Tag.FLOAT): return "float"; case (JDWP.Tag.DOUBLE): return "double"; case (JDWP.Tag.INT): return "int"; case (JDWP.Tag.LONG): return "long"; case (JDWP.Tag.SHORT): return "short"; case (JDWP.Tag.VOID): return "void"; case (JDWP.Tag.BOOLEAN): return "boolean"; case SIGNATURE_ENDFUNC: case SIGNATURE_FUNC: return nextTypeName(); default: throw new IllegalArgumentException( "Invalid JNI signature character '" + key + "'"); } } }
⏎ com/sun/tools/jdi/JNITypeParser.java
Or download all of them as a single archive file:
File name: jdk.jdi-17.0.5-src.zip File size: 476972 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.jdwp.agent.jmod - JDWP Agent Module
2023-04-17, 9905👍, 0💬
Popular Posts:
JDK 11 java.naming.jmod is the JMOD file for JDK 11 Naming module. JDK 11 Naming module compiled cla...
Apache Axis2 is the core engine for Web services. It is a complete re-design and re-write of the wid...
What Is mail.jar of JavaMail 1.4.2? I got the JAR file from javamail-1.4.2.zip. mail.jar in javamail...
JDK 11 jdk.jdeps.jmod is the JMOD file for JDK 11 JDeps tool, which can be invoked by the "jdeps" co...
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...