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 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/TerminalFactory.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; import java.text.MessageFormat; import java.util.HashMap; import java.util.Map; import jdk.internal.jline.internal.Configuration; import jdk.internal.jline.internal.Log; import static jdk.internal.jline.internal.Preconditions.checkNotNull; /** * Creates terminal instances. * * @author <a href="mailto:jason@planet57.com">Jason Dillon</a> * @since 2.0 */ public class TerminalFactory { public static final String JLINE_TERMINAL = "jline.terminal"; public static final String AUTO = "auto"; public static final String UNIX = "unix"; public static final String OSV = "osv"; public static final String WIN = "win"; public static final String WINDOWS = "windows"; public static final String FREEBSD = "freebsd"; public static final String NONE = "none"; public static final String OFF = "off"; public static final String FALSE = "false"; private static Terminal term = null; public static synchronized Terminal create() { return create(null); } public static synchronized Terminal create(String ttyDevice) { if (Log.TRACE) { //noinspection ThrowableInstanceNeverThrown Log.trace(new Throwable("CREATE MARKER")); } String defaultType = "dumb".equals(System.getenv("TERM")) ? NONE : AUTO; String type = Configuration.getString(JLINE_TERMINAL, defaultType); Log.debug("Creating terminal; type=", type); Terminal t; try { String tmp = type.toLowerCase(); if (tmp.equals(UNIX)) { t = getFlavor(Flavor.UNIX); } else if (tmp.equals(OSV)) { t = getFlavor(Flavor.OSV); } else if (tmp.equals(WIN) || tmp.equals(WINDOWS)) { t = getFlavor(Flavor.WINDOWS); } else if (tmp.equals(NONE) || tmp.equals(OFF) || tmp.equals(FALSE)) { if (System.getenv("INSIDE_EMACS") != null) { // emacs requires ansi on and echo off t = new UnsupportedTerminal(true, false); } else { // others the other way round t = new UnsupportedTerminal(false, true); } } else { if (tmp.equals(AUTO)) { String os = Configuration.getOsName(); Flavor flavor = Flavor.UNIX; if (os.contains(WINDOWS)) { flavor = Flavor.WINDOWS; } else if (System.getenv("OSV_CPUS") != null) { flavor = Flavor.OSV; } t = getFlavor(flavor, ttyDevice); } else { try { @SuppressWarnings("deprecation") Object o = Thread.currentThread().getContextClassLoader().loadClass(type).newInstance(); t = (Terminal) o; } catch (Exception e) { throw new IllegalArgumentException(MessageFormat.format("Invalid terminal type: {0}", type), e); } } } } catch (Exception e) { Log.error("Failed to construct terminal; falling back to unsupported", e); t = new UnsupportedTerminal(); } Log.debug("Created Terminal: ", t); try { t.init(); } catch (Throwable e) { Log.error("Terminal initialization failed; falling back to unsupported", e); return new UnsupportedTerminal(); } return t; } public static synchronized void reset() { term = null; } public static synchronized void resetIf(final Terminal t) { if(t == term) { reset(); } } public static enum Type { AUTO, WINDOWS, UNIX, OSV, NONE } public static synchronized void configure(final String type) { checkNotNull(type); System.setProperty(JLINE_TERMINAL, type); } public static synchronized void configure(final Type type) { checkNotNull(type); configure(type.name().toLowerCase()); } // // Flavor Support // public static enum Flavor { WINDOWS, UNIX, OSV } private static final Map<Flavor, TerminalConstructor> FLAVORS = new HashMap<>(); static { registerFlavor(Flavor.WINDOWS, ttyDevice -> new WindowsTerminal()); registerFlavor(Flavor.UNIX, ttyDevice -> new UnixTerminal(ttyDevice)); registerFlavor(Flavor.OSV, ttyDevice -> new OSvTerminal()); } public static synchronized Terminal get(String ttyDevice) { // The code is assuming we've got only one terminal per process. // Continuing this assumption, if this terminal is already initialized, // we don't check if it's using the same tty line either. Both assumptions // are a bit crude. TODO: check single terminal assumption. if (term == null) { term = create(ttyDevice); } return term; } public static synchronized Terminal get() { return get(null); } public static Terminal getFlavor(final Flavor flavor) throws Exception { return getFlavor(flavor, null); } @SuppressWarnings("deprecation") public static Terminal getFlavor(final Flavor flavor, String ttyDevice) throws Exception { TerminalConstructor factory = FLAVORS.get(flavor); if (factory != null) { return factory.createTerminal(ttyDevice); } else { throw new InternalError(); } } public static void registerFlavor(final Flavor flavor, final TerminalConstructor factory) { FLAVORS.put(flavor, factory); } public interface TerminalConstructor { public Terminal createTerminal(String str) throws Exception; } }
⏎ jdk/internal/jline/TerminalFactory.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, 23791👍, 0💬
Popular Posts:
How to display types defined in an XML Schema file with the xs\QueryXS.java provided in the Apache X...
JRE 5 sunjce_provider.jar is the JAR file for JRE 5 Sun JCE Provider, which provides implementations...
maven-compat-3.8.6.jar is the JAR file for Apache Maven 3.8.6 Compact module. The JAR file name may ...
jlGui is a music player for the Java platform. It is based on Java Sound 1.0 (i.e. JDK 1.3+). It sup...
xml-commons Resolver Source Code Files are provided in the source package file, xml-commons-resolver...