- All Implemented Interfaces:
Serializable
,Comparable<Snippet.Status>
,Constable
- Enclosing class:
- Snippet
public static enum Snippet.Status extends Enum<Snippet.Status>
Describes the current state of a Snippet.
This is a dynamic property of a Snippet within the JShell state --
thus is retrieved with a query on {@code JShell}.
The Status
changes as the state changes.
For example, creation of another snippet with
eval
may resolve dependencies of this Snippet (or invalidate those dependencies), or
overwrite
this Snippet changing its
Status
.
Important properties associated with Status
are:
isDefined()
, if it is visible to other
existing and new snippets; and
isActive()
, if, as the
JShell state changes, the snippet will update, possibly
changing Status
.
An executable Snippet can only be executed if it is in the the
VALID
Status
.
- See Also:
JShell.status(jdk.jshell.Snippet)