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.jshell.jmod - JShell Tool
JDK 11 jdk.jshell.jmod is the JMOD file for JDK 11 JShell tool, which can be invoked by the "jshell" command.
JDK 11 JShell tool compiled class files are stored in \fyicenter\jdk-11.0.1\jmods\jdk.jshell.jmod.
JDK 11 JShell tool compiled class files are also linked and stored in the \fyicenter\jdk-11.0.1\lib\modules JImage file.
JDK 11 JShell tool source code files are stored in \fyicenter\jdk-11.0.1\lib\src.zip\jdk.jshell.
You can click and view the content of each source code file in the list below.
✍: FYIcenter
⏎ jdk/internal/jshell/tool/ContinuousCompletionProvider.java
/* * Copyright (c) 2016, Oracle and/or its affiliates. All rights reserved. * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms. * * * * * * * * * * * * * * * * * * * * */ package jdk.internal.jshell.tool; import java.util.List; import static java.util.Comparator.comparing; import java.util.Map; import java.util.function.BiPredicate; import java.util.function.Supplier; import static java.util.stream.Collectors.toList; import java.util.stream.Stream; import jdk.internal.jshell.tool.JShellTool.CompletionProvider; import jdk.jshell.SourceCodeAnalysis; import jdk.jshell.SourceCodeAnalysis.Suggestion; class ContinuousCompletionProvider implements CompletionProvider { static final BiPredicate<String, String> STARTSWITH_MATCHER = String::startsWith; static final BiPredicate<String, String> PERFECT_MATCHER = String::equals; private final Supplier<Map<String, CompletionProvider>> wordCompletionProviderSupplier; private final BiPredicate<String, String> matcher; ContinuousCompletionProvider( Map<String, CompletionProvider> wordCompletionProvider, BiPredicate<String, String> matcher) { this(() -> wordCompletionProvider, matcher); } ContinuousCompletionProvider( Supplier<Map<String, CompletionProvider>> wordCompletionProviderSupplier, BiPredicate<String, String> matcher) { this.wordCompletionProviderSupplier = wordCompletionProviderSupplier; this.matcher = matcher; } @Override public List<Suggestion> completionSuggestions(String input, int cursor, int[] anchor) { String prefix = input.substring(0, cursor); int space = prefix.indexOf(' '); Stream<SourceCodeAnalysis.Suggestion> result; Map<String, CompletionProvider> wordCompletionProvider = wordCompletionProviderSupplier.get(); if (space == (-1)) { result = wordCompletionProvider.keySet().stream() .distinct() .filter(key -> key.startsWith(prefix)) .map(key -> new JShellTool.ArgSuggestion(key + " ")); anchor[0] = 0; } else { String rest = prefix.substring(space + 1); String word = prefix.substring(0, space); List<CompletionProvider> candidates = wordCompletionProvider.entrySet().stream() .filter(e -> matcher.test(e.getKey(), word)) .map(Map.Entry::getValue) .collect(toList()); if (candidates.size() == 1) { result = candidates.get(0).completionSuggestions(rest, cursor - space - 1, anchor).stream(); } else { result = Stream.empty(); } anchor[0] += space + 1; } return result.sorted(comparing(Suggestion::continuation)) .collect(toList()); } }
⏎ jdk/internal/jshell/tool/ContinuousCompletionProvider.java
Or download all of them as a single archive file:
File name: jdk.jshell-11.0.1-src.zip File size: 283093 bytes Release date: 2018-11-04 Download
⇒ JDK 11 jdk.jsobject.jmod - JS Object Module
2020-06-30, 29312👍, 0💬
Popular Posts:
How to download and install Apache XMLBeans Source Package? The source package contains Java source ...
Commons VFS provides a single API for accessing various different file systems. It presents a unifor...
maven-core-3.5.4.jar is the JAR file for Apache Maven 3.5.4 Core module. Apache Maven is a software ...
kernel.jar is a component in iText Java library to provide low-level functionalities. iText Java lib...
The JMX technology provides the tools for building distributed, Web-based, modular and dynamic solut...