- java.lang.Object
- 
- java.lang.Enum<Snippet.SubKind>
- 
- jdk.jshell.Snippet.SubKind
 
 
- 
- All Implemented Interfaces:
- Serializable,- Comparable<Snippet.SubKind>
 - Enclosing class:
- Snippet
 
 public static enum Snippet.SubKind extends Enum<Snippet.SubKind> The detailed variety of a snippet. This is a sub-classification of the Kind. The Kind of a SubKind is accessible withkind().
- 
- 
Enum Constant SummaryEnum Constants Enum Constant Description ANNOTATION_TYPE_SUBKINDAn annotation interface declaration.ASSIGNMENT_SUBKINDAn assignment expression.CLASS_SUBKINDA class declaration.ENUM_SUBKINDAn enum declaration.INTERFACE_SUBKINDAn interface declaration.METHOD_SUBKINDA method.OTHER_EXPRESSION_SUBKINDAn expression which has not been wrapped in a temporary variable (reserved).SINGLE_STATIC_IMPORT_SUBKINDSingle-Static-Import Declaration.SINGLE_TYPE_IMPORT_SUBKINDSingle-Type-Import Declaration.STATEMENT_SUBKINDA statement.STATIC_IMPORT_ON_DEMAND_SUBKINDStatic-Import-on-Demand Declaration.TEMP_VAR_EXPRESSION_SUBKINDAn expression whose value has been stored in a temporary variable.TYPE_IMPORT_ON_DEMAND_SUBKINDType-Import-on-Demand Declaration.UNKNOWN_SUBKINDAn unknown snippet.VAR_DECLARATION_SUBKINDA variable declaration without initializer.VAR_DECLARATION_WITH_INITIALIZER_SUBKINDA variable declaration with an initializer expression.VAR_VALUE_SUBKINDA simple variable reference expression.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanhasValue()Indicates whether thisSubKindis executable and is non-void.booleanisExecutable()Indicates whether thisSubKindis executable.Snippet.Kindkind()TheSnippet.Kindthat corresponds to thisSubKind.static Snippet.SubKindvalueOf(String name)Returns the enum constant of this type with the specified name.static Snippet.SubKind[]values()Returns an array containing the constants of this enum type, in the order they are declared.
 
- 
- 
- 
Enum Constant Detail- 
SINGLE_TYPE_IMPORT_SUBKINDpublic static final Snippet.SubKind SINGLE_TYPE_IMPORT_SUBKIND Single-Type-Import Declaration. An import declaration of a single type.- See The Java™ Language Specification:
- 7.5.1 SingleTypeImportDeclaration.
 
 - 
TYPE_IMPORT_ON_DEMAND_SUBKINDpublic static final Snippet.SubKind TYPE_IMPORT_ON_DEMAND_SUBKIND Type-Import-on-Demand Declaration. A non-static "star" import.- See The Java™ Language Specification:
- 7.5.2. TypeImportOnDemandDeclaration.
 
 - 
SINGLE_STATIC_IMPORT_SUBKINDpublic static final Snippet.SubKind SINGLE_STATIC_IMPORT_SUBKIND Single-Static-Import Declaration. An import of a static member.- See The Java™ Language Specification:
- 7.5.3 Single-Static-Import.
 
 - 
STATIC_IMPORT_ON_DEMAND_SUBKINDpublic static final Snippet.SubKind STATIC_IMPORT_ON_DEMAND_SUBKIND Static-Import-on-Demand Declaration. A static "star" import of all static members of a named type.- See The Java™ Language Specification:
- 7.5.4. Static-Import-on-Demand Static "star" import.
 
 - 
CLASS_SUBKINDpublic static final Snippet.SubKind CLASS_SUBKIND A class declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See The Java™ Language Specification:
- 8.1. NormalClassDeclaration.
 
 - 
INTERFACE_SUBKINDpublic static final Snippet.SubKind INTERFACE_SUBKIND An interface declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See The Java™ Language Specification:
- 9.1. NormalInterfaceDeclaration.
 
 - 
ENUM_SUBKINDpublic static final Snippet.SubKind ENUM_SUBKIND An enum declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See The Java™ Language Specification:
- 8.9. EnumDeclaration.
 
 - 
ANNOTATION_TYPE_SUBKINDpublic static final Snippet.SubKind ANNOTATION_TYPE_SUBKIND An annotation interface declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See The Java™ Language Specification:
- 9.6. AnnotationTypeDeclaration.
 
 - 
METHOD_SUBKINDpublic static final Snippet.SubKind METHOD_SUBKIND A method. The onlySubKindforSnippet.Kind.METHOD.- See The Java™ Language Specification:
- 8.4. MethodDeclaration.
 
 - 
VAR_DECLARATION_SUBKINDpublic static final Snippet.SubKind VAR_DECLARATION_SUBKIND A variable declaration without initializer. ASubKindofSnippet.Kind.VAR.- See The Java™ Language Specification:
- 8.3. VariableDeclarator without VariableInitializer in FieldDeclaration.
 
 - 
VAR_DECLARATION_WITH_INITIALIZER_SUBKINDpublic static final Snippet.SubKind VAR_DECLARATION_WITH_INITIALIZER_SUBKIND A variable declaration with an initializer expression. ASubKindofSnippet.Kind.VAR.- See The Java™ Language Specification:
- 8.3. VariableDeclarator with VariableInitializer in FieldDeclaration.
 
 - 
TEMP_VAR_EXPRESSION_SUBKINDpublic static final Snippet.SubKind TEMP_VAR_EXPRESSION_SUBKIND An expression whose value has been stored in a temporary variable. ASubKindofSnippet.Kind.VAR.- See The Java™ Language Specification:
- 15. Primary.
 
 - 
VAR_VALUE_SUBKINDpublic static final Snippet.SubKind VAR_VALUE_SUBKIND A simple variable reference expression. ASubKindofSnippet.Kind.EXPRESSION.- See The Java™ Language Specification:
- 15.11. Field Access as 3.8. Identifier.
 
 - 
ASSIGNMENT_SUBKINDpublic static final Snippet.SubKind ASSIGNMENT_SUBKIND An assignment expression. ASubKindofSnippet.Kind.EXPRESSION.- See The Java™ Language Specification:
- 15.26. Assignment.
 
 - 
OTHER_EXPRESSION_SUBKINDpublic static final Snippet.SubKind OTHER_EXPRESSION_SUBKIND An expression which has not been wrapped in a temporary variable (reserved). ASubKindofSnippet.Kind.EXPRESSION.
 - 
STATEMENT_SUBKINDpublic static final Snippet.SubKind STATEMENT_SUBKIND A statement. The onlySubKindforSnippet.Kind.STATEMENT.- See The Java™ Language Specification:
- 14.5. Statement.
 
 - 
UNKNOWN_SUBKINDpublic static final Snippet.SubKind UNKNOWN_SUBKIND An unknown snippet. The onlySubKindforSnippet.Kind.ERRONEOUS.
 
- 
 - 
Method Detail- 
valuespublic static Snippet.SubKind[] values() Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (Snippet.SubKind c : Snippet.SubKind.values()) System.out.println(c); - Returns:
- an array containing the constants of this enum type, in the order they are declared
 
 - 
valueOfpublic static Snippet.SubKind valueOf(String name) Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
- name- the name of the enum constant to be returned.
- Returns:
- the enum constant with the specified name
- Throws:
- IllegalArgumentException- if this enum type has no constant with the specified name
- NullPointerException- if the argument is null
 
 - 
isExecutablepublic boolean isExecutable() Indicates whether thisSubKindis executable.- Returns:
- trueif this- SubKindcan be executed; otherwise- false
 
 - 
hasValuepublic boolean hasValue() Indicates whether thisSubKindis executable and is non-void.- Returns:
- trueif this- SubKindhas a value; otherwise- false
 
 - 
kindpublic Snippet.Kind kind() TheSnippet.Kindthat corresponds to thisSubKind.- Returns:
- the fixed Kindfor thisSubKind
 
 
- 
 
-