Skip navigation links
A B C D E G H I J K M N O P R S T U V 

A

addToClasspath(String) - Method in class jdk.jshell.JShell
The specified path is added to the end of the classpath used in eval().
analyzeCompletion(String) - Method in class jdk.jshell.SourceCodeAnalysis
Given an input string, find the first snippet of code (one statement, definition, import, or expression) and evaluate if it is complete.

B

build() - Method in class jdk.jshell.JShell.Builder
Build a JShell state engine.
builder() - Static method in class jdk.jshell.JShell
Factory method for JShell.Builder which, in-turn, is used for creating instances of JShell.

C

causeSnippet() - Method in interface jdk.jshell.SnippetEvent
Either the snippet whose change caused this update or null.
close() - Method in class jdk.jshell.JShell
Close this state engine.
completeness - Variable in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
The analyzed completeness of the input.
CompletionInfo(SourceCodeAnalysis.Completeness, int, String, String) - Constructor for class jdk.jshell.SourceCodeAnalysis.CompletionInfo
 
completionSuggestions(String, int, int[]) - Method in class jdk.jshell.SourceCodeAnalysis
Compute possible follow-ups for the given input.
continuation - Variable in class jdk.jshell.SourceCodeAnalysis.Suggestion
The candidate continuation of the given user's input.
create() - Static method in class jdk.jshell.JShell
Create a new JShell state engine.

D

DeclarationSnippet - Class in jdk.jshell
Grouping for all declaration Snippets: variable declarations (VarSnippet), method declarations (MethodSnippet), and type declarations (TypeDeclSnippet).
diagnostics(Snippet) - Method in class jdk.jshell.JShell
Return the diagnostics of the most recent evaluation of the snippet.
documentation(String, int) - Method in class jdk.jshell.SourceCodeAnalysis
Compute a description/help string for the given user's input.
drop(PersistentSnippet) - Method in class jdk.jshell.JShell
Remove a declaration from the state.

E

err(PrintStream) - Method in class jdk.jshell.JShell.Builder
Error output for the running evaluation (it's System.err).
ErroneousSnippet - Class in jdk.jshell
A snippet of code that is not valid Java programming language code, and for which the kind of snippet could not be determined.
eval(String) - Method in class jdk.jshell.JShell
Evaluate the input String, including definition and/or execution, if applicable.
EvalException - Exception in jdk.jshell
Wraps an exception thrown in the remotely executing client.
exception() - Method in interface jdk.jshell.SnippetEvent
An instance of UnresolvedReferenceException, if an unresolved reference was encountered, or an instance of EvalException if an exception was thrown during execution, otherwise null.
ExpressionSnippet - Class in jdk.jshell
Snippet for an assignment or variable-value expression.

G

getExceptionClassName() - Method in exception jdk.jshell.EvalException
Returns the name of the Throwable subclass which was thrown in the executing client.
getMethodSnippet() - Method in exception jdk.jshell.UnresolvedReferenceException
Return the method Snippet which has the unresolved reference(s).

H

hasValue() - Method in enum jdk.jshell.Snippet.SubKind
Is this SubKind executable and is non-void.

I

id() - Method in class jdk.jshell.Snippet
The unique identifier for the snippet.
idGenerator(BiFunction<Snippet, Integer, String>) - Method in class jdk.jshell.JShell.Builder
Set the generator of identifying names for Snippets.
ImportSnippet - Class in jdk.jshell
Snippet for an import declaration.
in(InputStream) - Method in class jdk.jshell.JShell.Builder
Input for the running evaluation (it's System.in).
isActive - Variable in enum jdk.jshell.Snippet.Status
Is the Snippet active, that is, will the snippet be re-evaluated when a new JShell.eval(String) or JShell.drop(PersistentSnippet) that could change its status is invoked? This is more broad than Snippet.Status.isDefined since a Snippet which is Snippet.Status.RECOVERABLE_NOT_DEFINED will be updated.
isComplete - Variable in enum jdk.jshell.SourceCodeAnalysis.Completeness
Is the first snippet of source complete.
isDefined - Variable in enum jdk.jshell.Snippet.Status
Is the snippet currently part of the defined state of the JShell? Is it visible to compilation of other snippets?
isExecutable() - Method in enum jdk.jshell.Snippet.SubKind
Is this SubKind executable?
isPersistent - Variable in enum jdk.jshell.Snippet.Kind
True if this kind of snippet adds a declaration or declarations which are visible to subsequent evaluations.
isSignatureChange() - Method in interface jdk.jshell.SnippetEvent
Has the signature changed? Coming in or out of definition (status.isDefined) is always a signature change.
isSmart - Variable in class jdk.jshell.SourceCodeAnalysis.Suggestion
Is it an input continuation that matches the target type and is thus more likely to be the desired continuation.

J

jdk.jshell - package jdk.jshell
Provides interfaces for creating tools, such as a Read-Eval-Print Loop (REPL), which interactively evaluate "snippets" of Java programming language code.
JShell - Class in jdk.jshell
The JShell evaluation state engine.
JShell() - Constructor for class jdk.jshell.JShell
 
JShell.Builder - Class in jdk.jshell
Builder for JShell instances.
JShell.Subscription - Class in jdk.jshell
Subscription is a token for referring to subscriptions so they can be unsubscribed.

K

kind() - Method in class jdk.jshell.Snippet
The Snippet.Kind for the snippet.
kind() - Method in enum jdk.jshell.Snippet.SubKind
The Snippet.Kind that corresponds to this SubKind.

M

methods() - Method in class jdk.jshell.JShell
Returns the active method snippets.
MethodSnippet - Class in jdk.jshell
Snippet for a method definition.

N

name() - Method in class jdk.jshell.ExpressionSnippet
Variable name which is the value of the expression.
name() - Method in class jdk.jshell.ImportSnippet
The identifying name of the import.
name() - Method in class jdk.jshell.PersistentSnippet
Name of the Snippet.

O

onShutdown(Consumer<JShell>) - Method in class jdk.jshell.JShell
Register a callback to be called when this JShell instance terminates.
onSnippetEvent(Consumer<SnippetEvent>) - Method in class jdk.jshell.JShell
Register a callback to be called when the Status of a snippet changes.
out(PrintStream) - Method in class jdk.jshell.JShell.Builder
Output for the running evaluation (it's System.out).

P

parameterTypes() - Method in class jdk.jshell.MethodSnippet
A String representation of the parameter types of the method.
PersistentSnippet - Class in jdk.jshell
Grouping for Snippets which persist and influence future code.
previousStatus() - Method in interface jdk.jshell.SnippetEvent
The status before the transition.

R

remaining - Variable in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
Input remaining after the source

S

signature() - Method in class jdk.jshell.MethodSnippet
The full type signature of the method, including return type.
Snippet - Class in jdk.jshell
A Snippet represents a snippet of Java source code as passed to JShell.eval(java.lang.String).
snippet() - Method in interface jdk.jshell.SnippetEvent
The Snippet which has changed
Snippet.Kind - Enum in jdk.jshell
Describes the general kind of snippet.
Snippet.Status - Enum in jdk.jshell
Describes the current state of a Snippet.
Snippet.SubKind - Enum in jdk.jshell
The detailed variety of a snippet.
SnippetEvent - Interface in jdk.jshell
A description of a change to a Snippet.
snippets() - Method in class jdk.jshell.JShell
Return all snippets.
source() - Method in class jdk.jshell.Snippet
Return the source code of the snippet.
source - Variable in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
Source code for the first unit of code input.
sourceCodeAnalysis() - Method in class jdk.jshell.JShell
Access to source code analysis functionality.
SourceCodeAnalysis - Class in jdk.jshell
Provides analysis utilities for source code input.
SourceCodeAnalysis() - Constructor for class jdk.jshell.SourceCodeAnalysis
 
SourceCodeAnalysis.Completeness - Enum in jdk.jshell
Describes the completeness of the given input.
SourceCodeAnalysis.CompletionInfo - Class in jdk.jshell
The result of analyzeCompletion(String input).
SourceCodeAnalysis.Suggestion - Class in jdk.jshell
A candidate for continuation of the given user's input.
StatementSnippet - Class in jdk.jshell
Snippet for a statement.
status(Snippet) - Method in class jdk.jshell.JShell
Return the status of the snippet.
status() - Method in interface jdk.jshell.SnippetEvent
The after status.
stop() - Method in class jdk.jshell.JShell
Attempt to stop currently running evaluation.
subKind() - Method in class jdk.jshell.Snippet
Return the Snippet.SubKind of snippet.
Suggestion(String, boolean) - Constructor for class jdk.jshell.SourceCodeAnalysis.Suggestion
Create a Suggestion instance.

T

tempVariableNameGenerator(Supplier<String>) - Method in class jdk.jshell.JShell.Builder
Set a generator of temp variable names for VarSnippet of Snippet.SubKind.TEMP_VAR_EXPRESSION_SUBKIND.
toString() - Method in class jdk.jshell.MethodSnippet
 
toString() - Method in class jdk.jshell.Snippet
 
TypeDeclSnippet - Class in jdk.jshell
Snippet for a type definition (a class, interface, enum, or annotation interface definition).
typeName() - Method in class jdk.jshell.ExpressionSnippet
Type of the expression
typeName() - Method in class jdk.jshell.VarSnippet
A String representation of the type of the variable.
types() - Method in class jdk.jshell.JShell
Returns the active type declaration (class, interface, annotation type, and enum) snippets.

U

unitEndPos - Variable in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
The end of the first unit of source.
unresolvedDependencies(DeclarationSnippet) - Method in class jdk.jshell.JShell
For RECOVERABLE_DEFINED or RECOVERABLE_NOT_DEFINED declarations, the names of current unresolved dependencies for the snippet.
UnresolvedReferenceException - Exception in jdk.jshell
Exception reported on attempting to execute a RECOVERABLE_DEFINED method.
unsubscribe(JShell.Subscription) - Method in class jdk.jshell.JShell
Unsubscribe from a callback subscription.

V

value() - Method in interface jdk.jshell.SnippetEvent
The result value of successful run.
valueOf(String) - Static method in enum jdk.jshell.Snippet.Kind
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum jdk.jshell.Snippet.Status
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum jdk.jshell.Snippet.SubKind
Returns the enum constant of this type with the specified name.
valueOf(String) - Static method in enum jdk.jshell.SourceCodeAnalysis.Completeness
Returns the enum constant of this type with the specified name.
values() - Static method in enum jdk.jshell.Snippet.Kind
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum jdk.jshell.Snippet.Status
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum jdk.jshell.Snippet.SubKind
Returns an array containing the constants of this enum type, in the order they are declared.
values() - Static method in enum jdk.jshell.SourceCodeAnalysis.Completeness
Returns an array containing the constants of this enum type, in the order they are declared.
variables() - Method in class jdk.jshell.JShell
Returns the active variable snippets.
VarSnippet - Class in jdk.jshell
Snippet for a variable definition.
varValue(VarSnippet) - Method in class jdk.jshell.JShell
Get the current value of a variable.
A B C D E G H I J K M N O P R S T U V 
Skip navigation links