Snippet.Status (Java SE 19 & JDK 19) (original) (raw)

All Implemented Interfaces:

[Serializable](../../../java.base/java/io/Serializable.html "interface in java.io"), [Comparable](../../../java.base/java/lang/Comparable.html "interface in java.lang")<[Snippet.Status](Snippet.Status.html "enum class in jdk.jshell")>, [Constable](../../../java.base/java/lang/constant/Constable.html "interface in java.lang.constant")

Enclosing class:

[Snippet](Snippet.html "class in jdk.jshell")


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 JShell.

The Status changes as the state changes. For example, creation of another snippet witheval may resolve dependencies of this Snippet (or invalidate those dependencies), oroverwrite this Snippet changing itsStatus.

Important properties associated with Status are:isDefined(), if it is visible to other existing and new snippets; andisActive(), if, as the JShell state changes, the snippet will update, possibly changing Status. An executable Snippet can only be executed if it is in theVALID Status.

See Also:

Enum Constants
The snippet is inactive because it does not yet exist.
The snippet is inactive because it has been replaced by a new snippet.
The snippet is a declaration snippet with potentially recoverable unresolved references or other issues in its body (in the context of current JShell state).
The snippet is a declaration snippet with potentially recoverable unresolved references or other issues (in the context of current JShell state).
The snippet is inactive because it failed compilation on initial evaluation and it is not capable of becoming valid with further changes to the JShell state.
The snippet is a valid snippet (in the context of current JShell state).

boolean
[isActive](#isActive%28%29)()
boolean
[isDefined](#isDefined%28%29)()
Indicates whether the snippet is currently part of the defined state of the JShell.
Returns the enum constant of this class with the specified name.
[values](#values%28%29)()
Returns an array containing the constants of this enum class, in the order they are declared.

Methods declared in class java.lang.Enum

[clone](../../../java.base/java/lang/Enum.html#clone%28%29), [compareTo](../../../java.base/java/lang/Enum.html#compareTo%28E%29), [describeConstable](../../../java.base/java/lang/Enum.html#describeConstable%28%29), [equals](../../../java.base/java/lang/Enum.html#equals%28java.lang.Object%29), [finalize](../../../java.base/java/lang/Enum.html#finalize%28%29), [getDeclaringClass](../../../java.base/java/lang/Enum.html#getDeclaringClass%28%29), [hashCode](../../../java.base/java/lang/Enum.html#hashCode%28%29), [name](../../../java.base/java/lang/Enum.html#name%28%29), [ordinal](../../../java.base/java/lang/Enum.html#ordinal%28%29), [toString](../../../java.base/java/lang/Enum.html#toString%28%29), [valueOf](../../../java.base/java/lang/Enum.html#valueOf%28java.lang.Class,java.lang.String%29)