JDK 17 jdk.internal.le.jmod - Internal Line Editing Module

JDK 17 jdk.internal.le.jmod is the JMOD file for JDK 17 Internal Line Editing module.

JDK 17 Internal Line Editing module compiled class files are stored in \fyicenter\jdk-17.0.5\jmods\jdk.internal.le.jmod.

JDK 17 Internal Line Editing module compiled class files are also linked and stored in the \fyicenter\jdk-17.0.5\lib\modules JImage file.

JDK 17 Internal Line Editing module source code files are stored in \fyicenter\jdk-17.0.5\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/org/jline/utils/Log.java

/*
 * Copyright (c) 2002-2020, 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.
 *
 * https://opensource.org/licenses/BSD-3-Clause
 */
package jdk.internal.org.jline.utils;

import java.io.ByteArrayOutputStream;
import java.io.PrintStream;
import java.util.function.Supplier;
//import java.util.logging.Level;
//import java.util.logging.LogRecord;
//import java.util.logging.Logger;

/**
 * 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 {
//    private static final Logger logger = Logger.getLogger("org.jline");

    public static void trace(final Object... messages) {
//        log(Level.FINEST, messages);
    }

    public static void trace(Supplier<String> supplier) {
//        log(Level.FINEST, supplier);
    }

    public static void debug(Supplier<String> supplier) {
//        log(Level.FINE, supplier);
    }

    public static void debug(final Object... messages) {
//        log(Level.FINE, messages);
    }

    public static void info(final Object... messages) {
//        log(Level.INFO, messages);
    }

    public static void warn(final Object... messages) {
//        log(Level.WARNING, messages);
    }

    public static void error(final Object... messages) {
//        log(Level.SEVERE, messages);
    }

    public static boolean isDebugEnabled() {
//        return isEnabled(Level.FINE);
        return false;
    }

    /**
     * Helper to support rendering messages.
     */
    static void render(final PrintStream out, final Object message) {
        if (message != null && 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);
        }
    }

//    static LogRecord createRecord(final Level level, final Object... messages) {
//        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(level, baos.toString());
//        r.setThrown(cause);
//        return r;
//    }
//
//    static LogRecord createRecord(final Level level, final Supplier<String> message) {
//        return new LogRecord(level, message.get());
//    }
//
//    static void log(final Level level, final Supplier<String> message) {
//        logr(level, () -> createRecord(level, message));
//    }
//
//    static void log(final Level level, final Object... messages) {
//        logr(level, () -> createRecord(level, messages));
//    }
//
//    static void logr(final Level level, final Supplier<LogRecord> record) {
//        if (logger.isLoggable(level)) {
//            // inform record of the logger-name
//            LogRecord tmp = record.get();
//            tmp.setLoggerName(logger.getName());
//            logger.log(tmp);
//        }
//    }
//
//    static boolean isEnabled(Level level) {
//        return logger.isLoggable(level);
//    }

}

jdk/internal/org/jline/utils/Log.java

 

Or download all of them as a single archive file:

File name: jdk.internal.le-17.0.5-src.zip
File size: 231458 bytes
Release date: 2022-09-13
Download 

 

JDK 17 jdk.internal.opt.jmod - Internal Opt Module

JDK 17 jdk.internal.jvmstat.jmod - Internal JVM Stat Module

JDK 17 JMod/Module Files

⇑⇑ FAQ for JDK (Java Development Kit) 17

2023-08-25, 3953👍, 0💬