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/processing/ServiceProxy.java
/*
* Copyright (c) 2006, 2012, Oracle and/or its affiliates. All rights reserved.
* ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*
*/
package com.sun.tools.javac.processing;
import java.io.BufferedReader;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.net.MalformedURLException;
import java.net.URL;
/**
* Utility class to determine if a service can be found on the
* path that might be used to create a class loader.
*
* <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>
*
*/
// based on sun.misc.Service
class ServiceProxy {
static class ServiceConfigurationError extends Error {
static final long serialVersionUID = 7732091036771098303L;
ServiceConfigurationError(String msg) {
super(msg);
}
}
private static final String prefix = "META-INF/services/";
private static void fail(Class<?> service, String msg)
throws ServiceConfigurationError {
throw new ServiceConfigurationError(service.getName() + ": " + msg);
}
private static void fail(Class<?> service, URL u, int line, String msg)
throws ServiceConfigurationError {
fail(service, u + ":" + line + ": " + msg);
}
/**
* Parse the content of the given URL as a provider-configuration file.
*
* @param service
* The service class for which providers are being sought;
* used to construct error detail strings
*
* @param u
* The URL naming the configuration file to be parsed
*
* @return true if the name of a service is found
*
* @throws ServiceConfigurationError
* If an I/O error occurs while reading from the given URL, or
* if a configuration-file format error is detected
*/
private static boolean parse(Class<?> service, URL u) throws ServiceConfigurationError {
InputStream in = null;
BufferedReader r = null;
try {
in = u.openStream();
r = new BufferedReader(new InputStreamReader(in, "utf-8"));
int lc = 1;
String ln;
while ((ln = r.readLine()) != null) {
int ci = ln.indexOf('#');
if (ci >= 0) ln = ln.substring(0, ci);
ln = ln.trim();
int n = ln.length();
if (n != 0) {
if ((ln.indexOf(' ') >= 0) || (ln.indexOf('\t') >= 0))
fail(service, u, lc, "Illegal configuration-file syntax");
int cp = ln.codePointAt(0);
if (!Character.isJavaIdentifierStart(cp))
fail(service, u, lc, "Illegal provider-class name: " + ln);
for (int i = Character.charCount(cp); i < n; i += Character.charCount(cp)) {
cp = ln.codePointAt(i);
if (!Character.isJavaIdentifierPart(cp) && (cp != '.'))
fail(service, u, lc, "Illegal provider-class name: " + ln);
}
return true;
}
}
} catch (FileNotFoundException x) {
return false;
} catch (IOException x) {
fail(service, ": " + x);
} finally {
try {
if (r != null) r.close();
} catch (IOException y) {
fail(service, ": " + y);
}
try {
if (in != null) in.close();
} catch (IOException y) {
fail(service, ": " + y);
}
}
return false;
}
/**
* Return true if a description for at least one service is found in the
* service configuration files in the given URLs.
*/
public static boolean hasService(Class<?> service, URL[] urls)
throws ServiceConfigurationError {
for (URL url: urls) {
try {
String fullName = prefix + service.getName();
URL u = new URL(url, fullName);
boolean found = parse(service, u);
if (found)
return true;
} catch (MalformedURLException e) {
// should not happen; ignore it if it does
}
}
return false;
}
}
⏎ com/sun/tools/javac/processing/ServiceProxy.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, ≈124🔥, 0💬
Popular Posts:
Apache Commons CLI Source Code Files are provided in the source package file commons-cli-1.5.0-sourc. ..
iText is an ideal library for developers looking to enhance web- and other applications with dynamic...
Where to get the Java source code for Connector/J 8.0 User Impl module? Java source code files for C...
JDK 11 jdk.scripting.nashorn.jm odis the JMOD file for JDK 11 Scripting Nashorn module. JDK 11 Scrip...
How to perform XML Schema validation with sax\Writer.java provided in the Apache Xerces package? You...