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 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/javac/parser/ReferenceParser.java
/* * Copyright (c) 2012, 2016, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package com.sun.tools.javac.parser; import com.sun.tools.javac.parser.Tokens.TokenKind; import com.sun.tools.javac.tree.JCTree; import com.sun.tools.javac.util.List; import com.sun.tools.javac.util.ListBuffer; import com.sun.tools.javac.util.Log; import com.sun.tools.javac.util.Name; /** * A utility class to parse a string in a doc comment containing a * reference to an API element, such as a type, field or method. * * <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 ReferenceParser { /** * An object to contain the result of parsing a reference to an API element. * Any, but not all, of the member fields may be null. */ public static class Reference { public final JCTree.JCExpression moduleName; /** The type, if any, in the signature. */ public final JCTree qualExpr; /** The member name, if any, in the signature. */ public final Name member; /** The parameter types, if any, in the signature. */ public final List<JCTree> paramTypes; Reference(JCTree.JCExpression moduleName, JCTree qualExpr, Name member, List<JCTree> paramTypes) { this.moduleName = moduleName; this.qualExpr = qualExpr; this.member = member; this.paramTypes = paramTypes; } } /** * An exception that indicates an error occurred while parsing a signature. */ public static class ParseException extends Exception { private static final long serialVersionUID = 0; ParseException(String message) { super(message); } } private final ParserFactory fac; /** * Create a parser object to parse reference signatures. * @param fac a factory for parsing Java source code. */ public ReferenceParser(ParserFactory fac) { this.fac = fac; } /** * Parse a reference to an API element as may be found in doc comment. * @param sig the signature to be parsed * @return a {@code Reference} object containing the result of parsing the signature * @throws ParseException if there is an error while parsing the signature */ public Reference parse(String sig) throws ParseException { // Break sig apart into moduleName qualifiedExpr member paramTypes. JCTree.JCExpression moduleName; JCTree qualExpr; Name member; List<JCTree> paramTypes; Log.DeferredDiagnosticHandler deferredDiagnosticHandler = new Log.DeferredDiagnosticHandler(fac.log); try { int slash = sig.indexOf("/"); int hash = sig.indexOf("#", slash + 1); int lparen = sig.indexOf("(", Math.max(slash, hash) + 1); if (slash > -1) { moduleName = parseModule(sig.substring(0, slash)); } else { moduleName = null; } if (slash > 0 && sig.length() == slash + 1) { qualExpr = null; member = null; } else if (hash == -1) { if (lparen == -1) { qualExpr = parseType(sig.substring(slash + 1)); member = null; } else { qualExpr = null; member = parseMember(sig.substring(slash + 1, lparen)); } } else { qualExpr = (hash == slash + 1) ? null : parseType(sig.substring(slash + 1, hash)); if (lparen == -1) member = parseMember(sig.substring(hash + 1)); else member = parseMember(sig.substring(hash + 1, lparen)); } if (lparen < 0) { paramTypes = null; } else { int rparen = sig.indexOf(")", lparen); if (rparen != sig.length() - 1) throw new ParseException("dc.ref.bad.parens"); paramTypes = parseParams(sig.substring(lparen + 1, rparen)); } if (!deferredDiagnosticHandler.getDiagnostics().isEmpty()) throw new ParseException("dc.ref.syntax.error"); } finally { fac.log.popDiagnosticHandler(deferredDiagnosticHandler); } return new Reference(moduleName, qualExpr, member, paramTypes); } private JCTree.JCExpression parseModule(String s) throws ParseException { JavacParser p = fac.newParser(s, false, false, false); JCTree.JCExpression expr = p.qualident(false); if (p.token().kind != TokenKind.EOF) throw new ParseException("dc.ref.unexpected.input"); return expr; } private JCTree parseType(String s) throws ParseException { JavacParser p = fac.newParser(s, false, false, false); JCTree tree = p.parseType(); if (p.token().kind != TokenKind.EOF) throw new ParseException("dc.ref.unexpected.input"); return tree; } private Name parseMember(String s) throws ParseException { JavacParser p = fac.newParser(s, false, false, false); Name name = p.ident(); if (p.token().kind != TokenKind.EOF) throw new ParseException("dc.ref.unexpected.input"); return name; } private List<JCTree> parseParams(String s) throws ParseException { if (s.trim().isEmpty()) return List.nil(); JavacParser p = fac.newParser(s.replace("...", "[]"), false, false, false); ListBuffer<JCTree> paramTypes = new ListBuffer<>(); paramTypes.add(p.parseType()); if (p.token().kind == TokenKind.IDENTIFIER) p.nextToken(); while (p.token().kind == TokenKind.COMMA) { p.nextToken(); paramTypes.add(p.parseType()); if (p.token().kind == TokenKind.IDENTIFIER) p.nextToken(); } if (p.token().kind != TokenKind.EOF) throw new ParseException("dc.ref.unexpected.input"); return paramTypes.toList(); } }
⏎ com/sun/tools/javac/parser/ReferenceParser.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, ≈58🔥, 0💬
Popular Posts:
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
JRE 8 rt.jar is the JAR file for JRE 8 RT (Runtime) libraries. JRE (Java Runtime) 8 is the runtime e...
JDK 8 tools.jar is the JAR file for JDK 8 tools. It contains Java classes to support different JDK t...
How to read XML document with DTD validation from socket connections with the socket\DelayedInput.ja.. .
JDK 17 java.naming.jmod is the JMOD file for JDK 17 Naming module. JDK 17 Naming module compiled cla...