| Modifier and Type | Class and Description |
|---|---|
class |
DeclarationSnippet
Grouping for all declaration Snippets: variable declarations
(
VarSnippet), method declarations
(MethodSnippet), and type declarations
(TypeDeclSnippet). |
class |
ErroneousSnippet
A snippet of code that is not valid Java programming language code, and for
which the kind of snippet could not be determined.
|
class |
ExpressionSnippet
Snippet for an assignment or variable-value expression.
|
class |
ImportSnippet
Snippet for an import declaration.
|
class |
MethodSnippet
Snippet for a method definition.
|
class |
PersistentSnippet
Grouping for Snippets which persist and influence future code.
|
class |
StatementSnippet
Snippet for a statement.
|
class |
TypeDeclSnippet
Snippet for a type definition (a class, interface, enum, or annotation
interface definition).
|
class |
VarSnippet
Snippet for a variable definition.
|
| Modifier and Type | Method and Description |
|---|---|
Snippet |
SnippetEvent.causeSnippet()
Either the snippet whose change caused this update or
null. |
Snippet |
SnippetEvent.snippet()
The Snippet which has changed
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.util.List<Snippet> |
JShell.snippets()
Return all snippets.
|
| Modifier and Type | Method and Description |
|---|---|
abstract java.util.List<javax.tools.Diagnostic<java.lang.String>> |
JShell.diagnostics(Snippet snippet)
Return the diagnostics of the most recent evaluation of the snippet.
|
abstract Snippet.Status |
JShell.status(Snippet snippet)
Return the status of the snippet.
|
| Modifier and Type | Method and Description |
|---|---|
JShell.Builder |
JShell.Builder.idGenerator(java.util.function.BiFunction<Snippet,java.lang.Integer,java.lang.String> generator)
Set the generator of identifying names for Snippets.
|