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.compiler.jmod - Compiler Tool
JDK 17 jdk.compiler.jmod is the JMOD file for JDK 17 Compiler tool, which can be invoked by the "javac" command.
JDK 17 Compiler tool compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.compiler.jmod.
JDK 17 Compiler tool compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.
JDK 17 Compiler source code files are stored in \fyicenter\jdk-17.0.5\lib\src.zip\jdk.compiler.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ com/sun/tools/sjavac/comp/PubapiVisitor.java
/* * Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.tools.sjavac.comp; import static javax.lang.model.element.Modifier.PRIVATE; import java.util.List; import java.util.stream.Collectors; import javax.lang.model.element.*; import javax.lang.model.type.TypeMirror; import javax.lang.model.util.ElementScanner14; import com.sun.tools.javac.code.Symbol.ClassSymbol; import com.sun.tools.javac.util.DefinedBy; import com.sun.tools.javac.util.DefinedBy.Api; import com.sun.tools.sjavac.pubapi.PubApi; import com.sun.tools.sjavac.pubapi.PubApiTypeParam; import com.sun.tools.sjavac.pubapi.PubMethod; import com.sun.tools.sjavac.pubapi.PubType; import com.sun.tools.sjavac.pubapi.PubVar; import com.sun.tools.sjavac.pubapi.TypeDesc; /** Utility class that constructs a textual representation * of the public api of a class. * * <p><b>This is NOT part of any supported API. * If you write code that depends on this, you do so at your own risk. * This code and its internal interfaces are subject to change or * deletion without notice.</b> */ public class PubapiVisitor extends ElementScanner14<Void, Void> { private PubApi collectedApi = new PubApi(); private boolean isNonPrivate(Element e) { return !e.getModifiers().contains(PRIVATE); } @Override @DefinedBy(Api.LANGUAGE_MODEL) public Void visitType(TypeElement e, Void p) { if (isNonPrivate(e)) { PubApi prevApi = collectedApi; collectedApi = new PubApi(); super.visitType(e, p); if (!isAnonymous(e)) { String name = ((ClassSymbol) e).flatname.toString(); PubType t = new PubType(e.getModifiers(), name, //e.getQualifiedName().toString(), collectedApi); prevApi.types.put(t.fqName, t); } collectedApi = prevApi; } return null; } private boolean isAnonymous(TypeElement e) { return e.getQualifiedName().length() == 0; } private static String encodeChar(int c) { return String.format("\\u%04x", c); } @Override @DefinedBy(Api.LANGUAGE_MODEL) public Void visitVariable(VariableElement e, Void p) { if (isNonPrivate(e)) { Object constVal = e.getConstantValue(); String constValStr = null; // TODO: This doesn't seem to be entirely accurate. What if I change // from, say, 0 to 0L? (And the field is public static final so that // it could get inlined.) if (constVal != null) { if (e.asType().toString().equals("char")) { // What type is 'value'? Is it already a char? char c = constVal.toString().charAt(0); constValStr = "'" + encodeChar(c) + "'"; } else { constValStr = constVal.toString() .chars() .mapToObj(PubapiVisitor::encodeChar) .collect(Collectors.joining("", "\"", "\"")); } } PubVar v = new PubVar(e.getModifiers(), TypeDesc.fromType(e.asType()), e.toString(), constValStr); collectedApi.variables.put(v.identifier, v); } // Safe to not recurse here, because the only thing // to visit here is the constructor of a variable declaration. // If it happens to contain an anonymous inner class (which it might) // then this class is never visible outside of the package anyway, so // we are allowed to ignore it here. return null; } @Override @DefinedBy(Api.LANGUAGE_MODEL) public Void visitRecordComponent(RecordComponentElement e, Void p) { PubVar v = new PubVar(e.getModifiers(), TypeDesc.fromType(e.asType()), e.toString(), null); collectedApi.recordComponents.put(v.identifier, v); return null; } @Override @DefinedBy(Api.LANGUAGE_MODEL) public Void visitExecutable(ExecutableElement e, Void p) { if (isNonPrivate(e)) { PubMethod m = new PubMethod(e.getModifiers(), getTypeParameters(e.getTypeParameters()), TypeDesc.fromType(e.getReturnType()), e.getSimpleName().toString(), getTypeDescs(getParamTypes(e)), getTypeDescs(e.getThrownTypes())); collectedApi.methods.put(m.asSignatureString(), m); } return null; } private List<PubApiTypeParam> getTypeParameters(List<? extends TypeParameterElement> elements) { return elements.stream() .map(e -> new PubApiTypeParam(e.getSimpleName().toString(), getTypeDescs(e.getBounds()))) .toList(); } private List<TypeMirror> getParamTypes(ExecutableElement e) { return e.getParameters() .stream() .map(VariableElement::asType) .toList(); } private List<TypeDesc> getTypeDescs(List<? extends TypeMirror> list) { return list.stream() .map(TypeDesc::fromType) .toList(); } public PubApi getCollectedPubApi() { return collectedApi; } }
⏎ com/sun/tools/sjavac/comp/PubapiVisitor.java
Or download all of them as a single archive file:
File name: jdk.compiler-17.0.5-src.zip File size: 1450209 bytes Release date: 2022-09-13 Download
⇒ JDK 17 jdk.crypto.cryptoki.jmod - Crypto KI Module
2023-10-15, 17811👍, 0💬
Popular Posts:
How to download and install JDK (Java Development Kit) 5? If you want to write Java applications, yo...
The Web Services Description Language for Java Toolkit (WSDL4J), Release 1.6.2, allows the creation,...
What Is HttpComponents httpcore-4.4.6.jar? HttpComponents httpcore-4.4.6.jar is the JAR file for Apa...
What Is javaws.jar in JRE (Java Runtime Environment) 8? javaws.jar in JRE (Java Runtime Environment)...
JDK 11 java.xml.jmod is the JMOD file for JDK 11 XML (eXtensible Markup Language) module. JDK 11 XML...