Enum Class Snippet.SubKind
- All Implemented Interfaces:
- Serializable,- Comparable<Snippet.SubKind>,- Constable
- Enclosing class:
- Snippet
The detailed variety of a snippet.  This is a sub-classification of the
 Kind.  The Kind of a SubKind is accessible with
 
kind().- Since:
- 9
- 
Nested Class SummaryNested classes/interfaces declared in class java.lang.EnumEnum.EnumDesc<E extends Enum<E>>
- 
Enum Constant SummaryEnum ConstantsEnum ConstantDescriptionAn annotation interface declaration.An assignment expression.A class declaration.An enum declaration.An interface declaration.A method.Preview.Import Module Declaration.An expression which has not been wrapped in a temporary variable (reserved).A record declaration.Single-Static-Import Declaration.Single-Type-Import Declaration.A statement.Static-Import-on-Demand Declaration.An expression whose value has been stored in a temporary variable.Type-Import-on-Demand Declaration.An unknown snippet.A variable declaration without initializer.A variable declaration with an initializer expression.A simple variable reference expression.
- 
Method SummaryModifier and TypeMethodDescriptionbooleanhasValue()Indicates whether thisSubKindis executable and is non-void.booleanIndicates whether thisSubKindis executable.kind()TheSnippet.Kindthat corresponds to thisSubKind.static Snippet.SubKindReturns the enum constant of this class with the specified name.static Snippet.SubKind[]values()Returns an array containing the constants of this enum class, in the order they are declared.
- 
Enum Constant Details- 
SINGLE_TYPE_IMPORT_SUBKINDSingle-Type-Import Declaration. An import declaration of a single type.- See Java Language Specification:
- 
7.5.1 Single-Type-Import Declarations
 
- 
TYPE_IMPORT_ON_DEMAND_SUBKINDType-Import-on-Demand Declaration. A non-static "star" import.- See Java Language Specification:
- 
7.5.2 Type-Import-on-Demand Declarations
 
- 
SINGLE_STATIC_IMPORT_SUBKINDSingle-Static-Import Declaration. An import of a static member.- See Java Language Specification:
- 
7.5.3 Single-Static-Import Declarations
 
- 
STATIC_IMPORT_ON_DEMAND_SUBKINDStatic-Import-on-Demand Declaration. A static "star" import of all static members of a named type.- See Java Language Specification:
- 
7.5.4 Static-Import-on-Demand Declarations
 
- 
MODULE_IMPORT_SUBKINDMODULE_IMPORT_SUBKINDis a reflective preview API of the Java platform.Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.Import Module Declaration. An import declaration of a module.- See Java Language Specification:
- 
7.5.5 Import Module Declarations
- Since:
- 23
 
- 
CLASS_SUBKINDA class declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See Java Language Specification:
- 
8.1 Class Declarations
 
- 
INTERFACE_SUBKINDAn interface declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See Java Language Specification:
- 
9.1 Interface Declarations
 
- 
ENUM_SUBKINDAn enum declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See Java Language Specification:
- 
8.9 Enum Classes
 
- 
RECORD_SUBKINDA record declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See Java Language Specification:
- 
8.10 Record Classes
- Since:
- 17
 
- 
ANNOTATION_TYPE_SUBKINDAn annotation interface declaration. ASubKindofSnippet.Kind.TYPE_DECL.- See Java Language Specification:
- 
9.6 Annotation Interfaces
 
- 
METHOD_SUBKINDA method. The onlySubKindforSnippet.Kind.METHOD.- See Java Language Specification:
- 
8.4 Method Declarations
 
- 
VAR_DECLARATION_SUBKINDA variable declaration without initializer. ASubKindofSnippet.Kind.VAR.- See Java Language Specification:
- 
8.3 Field Declarations
 
- 
VAR_DECLARATION_WITH_INITIALIZER_SUBKINDA variable declaration with an initializer expression. ASubKindofSnippet.Kind.VAR.- See Java Language Specification:
- 
8.3 Field Declarations
 
- 
TEMP_VAR_EXPRESSION_SUBKINDAn expression whose value has been stored in a temporary variable. ASubKindofSnippet.Kind.VAR.- See Java Language Specification:
- 
15 Expressions
 
- 
VAR_VALUE_SUBKINDA simple variable reference expression. ASubKindofSnippet.Kind.EXPRESSION.- See Java Language Specification:
- 
15.11 Field Access Expressions
 
- 
ASSIGNMENT_SUBKINDAn assignment expression. ASubKindofSnippet.Kind.EXPRESSION.- See Java Language Specification:
- 
15.26 Assignment Operators
 
- 
OTHER_EXPRESSION_SUBKINDAn expression which has not been wrapped in a temporary variable (reserved). ASubKindofSnippet.Kind.EXPRESSION.
- 
STATEMENT_SUBKINDA statement. The onlySubKindforSnippet.Kind.STATEMENT.- See Java Language Specification:
- 
14.5 Statements
 
- 
UNKNOWN_SUBKINDAn unknown snippet. The onlySubKindforSnippet.Kind.ERRONEOUS.
 
- 
- 
Method Details- 
valuesReturns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
 
- 
valueOfReturns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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 class 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
 
- 
kindTheSnippet.Kindthat corresponds to thisSubKind.- Returns:
- the fixed Kindfor thisSubKind
 
 
-