Enum Class Snippet.Kind

java.lang.Object
java.lang.Enum<Snippet.Kind>
jdk.jshell.Snippet.Kind
All Implemented Interfaces:
Serializable, Comparable<Snippet.Kind>, Constable
Enclosing class:
Snippet

public static enum Snippet.Kind extends Enum<Snippet.Kind>
Describes the general kind of snippet. The Kind is an immutable property of a Snippet. It is accessed with Snippet.kind(). The Kind can be used to determine which subclass of Snippet it is. For example, eval("int three() { return 3; }") will return a snippet creation event. The Kind of that Snippet will be METHOD, from which you know that the subclass of Snippet is MethodSnippet and it can be cast as such.
Since:
9
  • Nested Class Summary

    Nested classes/interfaces declared in class java.lang.Enum

    Enum.EnumDesc<E extends Enum<E>>
  • Enum Constant Summary

    Enum Constants
    Enum Constant
    Description
    A syntactically incorrect input for which the specific kind could not be determined.
    An expression, with or without side-effects.
    An import declaration: import ...
    A method declaration.
    A statement.
    A type declaration.
    One variable declaration.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Indicates whether this Kind of Snippet is persistent.