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 11 jdk.internal.le.jmod - Internal Line Editing Module
JDK 11 jdk.internal.le.jmod is the JMOD file for JDK 11 Internal Line Editing module.
JDK 11 Internal Line Editing module compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.internal.le.jmod.
JDK 11 Internal Line Editing module compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 Internal Line Editing module source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.internal.le.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/jline/internal/Log.java
/*
* Copyright (c) 2002-2016, the original author or authors.
*
* This software is distributable under the BSD license. See the terms of the
* BSD license in the documentation provided with this software.
*
* http://www.opensource.org/licenses/bsd-license.php
*/
package jdk.internal.jline.internal;
import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
//import java.util.logging.LogRecord;
//import java.util.logging.Logger;
import static jdk.internal.jline.internal.Preconditions.checkNotNull;
/**
* Internal logger.
*
* @author <a href="mailto:jason@planet57.com">Jason Dillon</a>
* @author <a href="mailto:gnodet@gmail.com">Guillaume Nodet</a>
* @since 2.0
*/
public final class Log
{
///CLOVER:OFF
public static enum Level
{
TRACE,
DEBUG,
INFO,
WARN,
ERROR
}
public static final boolean TRACE = Configuration.getBoolean(Log.class.getName() + ".trace");
public static final boolean DEBUG = TRACE || Configuration.getBoolean(Log.class.getName() + ".debug");
private static PrintStream output = System.err;
private static boolean useJul = Configuration.getBoolean("jline.log.jul");
public static PrintStream getOutput() {
return output;
}
public static void setOutput(final PrintStream out) {
output = checkNotNull(out);
}
/**
* Helper to support rendering messages.
*/
@TestAccessible
static void render(final PrintStream out, final Object message) {
if (message.getClass().isArray()) {
Object[] array = (Object[]) message;
out.print("[");
for (int i = 0; i < array.length; i++) {
out.print(array[i]);
if (i + 1 < array.length) {
out.print(",");
}
}
out.print("]");
}
else {
out.print(message);
}
}
@TestAccessible
static void log(final Level level, final Object... messages) {
if (useJul) {
logWithJul(level, messages);
return;
}
//noinspection SynchronizeOnNonFinalField
synchronized (output) {
output.format("[%s] ", level);
for (int i=0; i<messages.length; i++) {
// Special handling for the last message if its a throwable, render its stack on the next line
if (i + 1 == messages.length && messages[i] instanceof Throwable) {
output.println();
((Throwable)messages[i]).printStackTrace(output);
}
else {
render(output, messages[i]);
}
}
output.println();
output.flush();
}
}
static void logWithJul(Level level, Object... messages) {
// Logger logger = Logger.getLogger("jline");
// Throwable cause = null;
// ByteArrayOutputStream baos = new ByteArrayOutputStream();
// PrintStream ps = new PrintStream(baos);
// for (int i = 0; i < messages.length; i++) {
// // Special handling for the last message if its a throwable, render its stack on the next line
// if (i + 1 == messages.length && messages[i] instanceof Throwable) {
// cause = (Throwable) messages[i];
// }
// else {
// render(ps, messages[i]);
// }
// }
// ps.close();
// LogRecord r = new LogRecord(toJulLevel(level), baos.toString());
// r.setThrown(cause);
// logger.log(r);
}
// private static java.util.logging.Level toJulLevel(Level level) {
// switch (level) {
// case TRACE:
// return java.util.logging.Level.FINEST;
// case DEBUG:
// return java.util.logging.Level.FINE;
// case INFO:
// return java.util.logging.Level.INFO;
// case WARN:
// return java.util.logging.Level.WARNING;
// case ERROR:
// return java.util.logging.Level.SEVERE;
// default:
// throw new IllegalArgumentException();
// }
// }
public static void trace(final Object... messages) {
if (TRACE) {
log(Level.TRACE, messages);
}
}
public static void debug(final Object... messages) {
if (TRACE || DEBUG) {
log(Level.DEBUG, messages);
}
}
/**
* @since 2.7
*/
public static void info(final Object... messages) {
log(Level.INFO, messages);
}
public static void warn(final Object... messages) {
log(Level.WARN, messages);
}
public static void error(final Object... messages) {
log(Level.ERROR, messages);
}
}
⏎ jdk/internal/jline/internal/Log.java
Or download all of them as a single archive file:
File name: jdk.internal.le-11.0.1-src.zip File size: 116985 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.internal.opt.jmod - Internal Opt Module
⇐ JDK 11 jdk.internal.jvmstat.jmod - Internal JVM Stat Module
2020-08-02, ≈35🔥, 0💬
Popular Posts:
What Is javax.websocket-api-1.1. jar?javax.websocket-api-1.1. jaris the JAR file for Java API for We...
jTDS JDBC Driver Source Code Files are provided in the source package file, jtds-1.3.1-fyi.zip. You ...
What Is jaxb-api-2.1.6.jar? Java Architecture for XML Binding (JAXB) is a Java API that allows Java ...
What Is mail.jar of JavaMail 1.3? I got the JAR file from javamail-1_3.zip. mail.jar in javamail-1_3...
What Is poi-scratchpad-5.2.3.jar ?poi-scratchpad-5.2.3.jar is one of the JAR files for Apache POI 5....