JSHELL API
DRAFT 9-ea+126
A B C D E F G H I J K L M N O P R S T U V W 

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.
analyzeType(String, int) - Method in class jdk.jshell.SourceCodeAnalysis
Infer the type of the given expression.

B

build() - Method in class jdk.jshell.JShell.Builder
Builds 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 class jdk.jshell.SnippetEvent
Either the snippet whose change caused this update or null.
className() - Method in class jdk.jshell.OuterSnippetsClassWrap
 
close() - Method in class jdk.jshell.JShell
Close this state engine.
compilerOptions(String...) - Method in class jdk.jshell.JShell.Builder
Adds compiler options.
completeness() - Method in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
The analyzed completeness of the input.
completionSuggestions(String, int, int[]) - Method in class jdk.jshell.SourceCodeAnalysis
Compute possible follow-ups for the given input.
continuation() - Method 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).
dependents(Snippet) - Method in class jdk.jshell.SourceCodeAnalysis
Returns a collection of Snippets which might need updating if the given Snippet is updated.
Diag - Class in jdk.jshell
Diagnostic information for a Snippet.
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
Sets the 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.
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 class 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.
executionEngine(ExecutionControl) - Method in class jdk.jshell.JShell.Builder
Sets the custom engine for execution.
ExpressionSnippet - Class in jdk.jshell
Snippet for an assignment or variable-value expression.

F

fullClassName() - Method in interface jdk.jshell.SourceCodeAnalysis.SnippetWrapper
Returns the fully qualified class name of the SourceCodeAnalysis.SnippetWrapper.wrapped() class.
fullname() - Method in class jdk.jshell.ImportSnippet
The qualified name of the import.

G

getCode() - Method in class jdk.jshell.Diag
Returns a diagnostic code indicating the type of diagnostic.
getEndPosition() - Method in class jdk.jshell.Diag
Returns the character offset from the beginning of the file associated with this diagnostic that indicates the end of the problem.
getExceptionClassName() - Method in exception jdk.jshell.EvalException
Returns the name of the Throwable subclass which was thrown in the executing client.
getMessage(Locale) - Method in class jdk.jshell.Diag
Returns a localized message for the given locale.
getNames() - Method in class jdk.jshell.SourceCodeAnalysis.QualifiedNames
Known qualified names for the given simple name in the original code.
getPosition() - Method in class jdk.jshell.Diag
Returns a character offset from the beginning of the source object associated with this diagnostic that indicates the location of the problem.
getSimpleNameLength() - Method in class jdk.jshell.SourceCodeAnalysis.QualifiedNames
The length of the simple name in the original code for which the qualified names where gathered.
getSnippet() - Method in exception jdk.jshell.UnresolvedReferenceException
Return the Snippet which has the unresolved reference(s).
getStartPosition() - Method in class jdk.jshell.Diag
Returns the character offset from the beginning of the file associated with this diagnostic that indicates the start of the problem.

H

hasValue() - Method in enum jdk.jshell.Snippet.SubKind
Indicates whether this SubKind is 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
Sets the generator of identifying names for Snippets.
imports() - Method in class jdk.jshell.JShell
Returns the active import snippets.
ImportSnippet - Class in jdk.jshell
Snippet for an import declaration.
in(InputStream) - Method in class jdk.jshell.JShell.Builder
Sets the input for the running evaluation (it's System.in).
isActive() - Method in enum jdk.jshell.Snippet.Status
Indicates whether the Snippet is 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.
isComplete() - Method in enum jdk.jshell.SourceCodeAnalysis.Completeness
Indicates whether the first snippet of source is complete.
isDefined() - Method in enum jdk.jshell.Snippet.Status
Indicates whether the snippet is currently part of the defined state of the JShell.
isError() - Method in class jdk.jshell.Diag
Indicates whether this diagnostic is an error (as opposed to a warning or note).
isExecutable() - Method in enum jdk.jshell.Snippet.SubKind
Indicates whether this SubKind is executable.
isPersistent() - Method in enum jdk.jshell.Snippet.Kind
Indicates whether this Kind of Snippet is persistent.
isResolvable() - Method in class jdk.jshell.SourceCodeAnalysis.QualifiedNames
Indicates whether the given simple name in the original code refers to a resolvable element.
isSignatureChange() - Method in class jdk.jshell.SnippetEvent
Indicates whether the signature has changed.
isStatic() - Method in class jdk.jshell.ImportSnippet
Indicates whether this snippet represents a static import.
isUpToDate() - Method in class jdk.jshell.SourceCodeAnalysis.QualifiedNames
Indicates whether the result is based on up-to-date data.

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.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.
JShellException - Exception in jdk.jshell
The superclass of JShell generated exceptions

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.
kind() - Method in interface jdk.jshell.SourceCodeAnalysis.SnippetWrapper

L

listQualifiedNames(String, int) - Method in class jdk.jshell.SourceCodeAnalysis
List qualified names known for the simple name in the given code immediately to the left of the given cursor position.

M

matchesType() - Method in class jdk.jshell.SourceCodeAnalysis.Suggestion
Indicates whether input continuation matches the target type and is thus more likely to be the desired continuation.
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.
NOPOS - Static variable in class jdk.jshell.Diag
Used to signal that no position is available.

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
Sets the output for the running evaluation (it's System.out).
OuterImportSnippetWrap - Class in jdk.jshell
The outer wrap for a set of snippets wrapped in a generated class
OuterSnippetsClassWrap - Class in jdk.jshell
The outer wrap for a set of snippets wrapped in a generated class
OuterWrapMap - Class in jdk.jshell
 

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 class jdk.jshell.SnippetEvent
The status before the transition.
probableKind() - Method in class jdk.jshell.ErroneousSnippet
Returns what appears to be the intended Kind in this erroneous snippet.

R

remaining() - Method in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
Input remaining after the complete part of the source.
remoteVMOptions(String...) - Method in class jdk.jshell.JShell.Builder
Sets additional VM options for launching the VM.

S

signature() - Method in class jdk.jshell.MethodSnippet
The full type signature of the method, including return type.
snippet() - Method in class jdk.jshell.SnippetEvent
The Snippet which has changed
Snippet - Class in jdk.jshell
A Snippet represents a snippet of Java source code as passed to JShell.eval.
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 - Class 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() - Method in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
Source code for the first Snippet of code input.
source() - Method in interface jdk.jshell.SourceCodeAnalysis.SnippetWrapper
Returns the input that is wrapped.
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.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.QualifiedNames - Class in jdk.jshell
List of possible qualified names.
SourceCodeAnalysis.SnippetWrapper - Interface in jdk.jshell
The wrapping of a snippet of Java source into valid top-level Java source.
SourceCodeAnalysis.Suggestion - Class in jdk.jshell
A candidate for continuation of the given user's input.
sourceToWrappedPosition(int) - Method in interface jdk.jshell.SourceCodeAnalysis.SnippetWrapper
Maps character position within the source to character position within the wrapped.
StatementSnippet - Class in jdk.jshell
Snippet for a statement.
status() - Method in class jdk.jshell.SnippetEvent
The after status.
status(Snippet) - Method in class jdk.jshell.JShell
Return the status of the snippet.
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
Sets 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.OuterImportSnippetWrap
 
toString() - Method in class jdk.jshell.OuterSnippetsClassWrap
 
toString() - Method in class jdk.jshell.Snippet
 
toString() - Method in class jdk.jshell.SnippetEvent
Return a string representation of the event
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() - Method in class jdk.jshell.SourceCodeAnalysis.CompletionInfo
The end of the first Snippet 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 snippet.
unsubscribe(JShell.Subscription) - Method in class jdk.jshell.JShell
Cancel a callback subscription.

V

value() - Method in class 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.

W

wrapLineToSnippet(int) - Method in class jdk.jshell.OuterSnippetsClassWrap
 
wrapped() - Method in interface jdk.jshell.SourceCodeAnalysis.SnippetWrapper
Returns a Java class definition that wraps the SourceCodeAnalysis.SnippetWrapper.source() or, if an import, the import source.
wrappedToSourcePosition(int) - Method in interface jdk.jshell.SourceCodeAnalysis.SnippetWrapper
Maps character position within the wrapped to character position within the source.
wrapper(Snippet) - Method in class jdk.jshell.SourceCodeAnalysis
Returns the wrapper information for the Snippet.
wrappers(String) - Method in class jdk.jshell.SourceCodeAnalysis
Returns the wrapper information for the snippet within the input source string.
A B C D E F G H I J K L M N O P R S T U V W 
Skip navigation links
JSHELL API
DRAFT 9-ea+126


Copyright © 2015, 2016, Oracle and/or its affiliates. All rights reserved.

DRAFT 9-ea+126