ErroneousSnippet
, ExpressionSnippet
, PersistentSnippet
, StatementSnippet
A Snippet represents a snippet of Java source code as passed to
JShell.eval(java.lang.String)
. It is associated only with the
JShell
instance that created it. An instance of Snippet (including its subclasses) is immutable: an access to any of its methods will always return the same result. For information about the current state of the snippet within the JShell state engine, query
JShell
passing the Snippet.
Because it is immutable, Snippet
(and subclasses) is thread-safe.
Nested Classes
static enum
Describes the general kind of snippet.
static enum
Describes the current state of a Snippet.
static enum
The detailed variety of a snippet.
The unique identifier for the snippet.
Return the source code of the snippet.
Methods declared in class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
The unique identifier for the snippet. No two active snippets will have the same id(). Value of id has no prescribed meaning. The details of how the id is generated and the mechanism to change it is documented in
JShell.Builder.idGenerator(BiFunction)
.
The
Snippet.Kind
for the snippet. Indicates the subclass of Snippet.
Return the
Snippet.SubKind
of snippet. The SubKind is useful for feedback to users.
Return the source code of the snippet.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4