- 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().-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn annotation interface declaration.An assignment expression.A class declaration.An enum declaration.An interface declaration.A method.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 Summary
Modifier 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_SUBKIND
Single-Type-Import Declaration. An import declaration of a single type. -
TYPE_IMPORT_ON_DEMAND_SUBKIND
Type-Import-on-Demand Declaration. A non-static "star" import. -
SINGLE_STATIC_IMPORT_SUBKIND
Single-Static-Import Declaration. An import of a static member. -
STATIC_IMPORT_ON_DEMAND_SUBKIND
Static-Import-on-Demand Declaration. A static "star" import of all static members of a named type. -
CLASS_SUBKIND
A class declaration. ASubKindofSnippet.Kind.TYPE_DECL. -
INTERFACE_SUBKIND
An interface declaration. ASubKindofSnippet.Kind.TYPE_DECL. -
ENUM_SUBKIND
An enum declaration. ASubKindofSnippet.Kind.TYPE_DECL. -
RECORD_SUBKIND
A record declaration. ASubKindofSnippet.Kind.TYPE_DECL.- Since:
- 14
-
ANNOTATION_TYPE_SUBKIND
An annotation interface declaration. ASubKindofSnippet.Kind.TYPE_DECL. -
METHOD_SUBKIND
A method. The onlySubKindforSnippet.Kind.METHOD. -
VAR_DECLARATION_SUBKIND
A variable declaration without initializer. ASubKindofSnippet.Kind.VAR. -
VAR_DECLARATION_WITH_INITIALIZER_SUBKIND
A variable declaration with an initializer expression. ASubKindofSnippet.Kind.VAR. -
TEMP_VAR_EXPRESSION_SUBKIND
An expression whose value has been stored in a temporary variable. ASubKindofSnippet.Kind.VAR. -
VAR_VALUE_SUBKIND
A simple variable reference expression. ASubKindofSnippet.Kind.EXPRESSION. -
ASSIGNMENT_SUBKIND
An assignment expression. ASubKindofSnippet.Kind.EXPRESSION. -
OTHER_EXPRESSION_SUBKIND
An expression which has not been wrapped in a temporary variable (reserved). ASubKindofSnippet.Kind.EXPRESSION. -
STATEMENT_SUBKIND
A statement. The onlySubKindforSnippet.Kind.STATEMENT. -
UNKNOWN_SUBKIND
An unknown snippet. The onlySubKindforSnippet.Kind.ERRONEOUS.
-
-
Method Details
-
values
Returns 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
-
valueOf
Returns 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 nameNullPointerException- if the argument is null
-
isExecutable
public boolean isExecutable()Indicates whether thisSubKindis executable.- Returns:
trueif thisSubKindcan be executed; otherwisefalse
-
hasValue
public boolean hasValue()Indicates whether thisSubKindis executable and is non-void.- Returns:
trueif thisSubKindhas a value; otherwisefalse
-
kind
TheSnippet.Kindthat corresponds to thisSubKind.- Returns:
- the fixed
Kindfor thisSubKind
-