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 Summary
Nested classes/interfaces declared in class Enum
Enum.EnumDesc<E>
Modifier and TypeClassDescriptionstatic final class
Enum.EnumDesc<E extends Enum<E>>
A nominal descriptor for anenum
constant. -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionAn annotation interface declaration.An assignment expression.A class declaration.An enum declaration.An interface declaration.A method.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 Summary
Modifier and TypeMethodDescriptionboolean
hasValue()
Indicates whether thisSubKind
is executable and is non-void
.boolean
Indicates whether thisSubKind
is executable.kind()
TheSnippet.Kind
that corresponds to thisSubKind
.static Snippet.SubKind
Returns 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.Methods declared in class Enum
clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
Modifier and TypeMethodDescriptionprotected final Object
clone()
Throws CloneNotSupportedException.final int
Compares this enum with the specified object for order.final Optional
<Enum.EnumDesc<Snippet.SubKind>> Returns an enum descriptorEnumDesc
for this instance, if one can be constructed, or an emptyOptional
if one cannot be.final boolean
Returns true if the specified object is equal to this enum constant.protected final void
finalize()
Deprecated, for removal: This API element is subject to removal in a future version.Finalization has been deprecated for removal.final Class
<Snippet.SubKind> Returns the Class object corresponding to this enum constant's enum type.final int
hashCode()
Returns a hash code for this enum constant.final String
name()
Returns the name of this enum constant, exactly as declared in its enum declaration.final int
ordinal()
Returns the ordinal of this enumeration constant (its position in its enum declaration, where the initial constant is assigned an ordinal of zero).toString()
Returns the name of this enum constant, as contained in the declaration.static <T extends Enum<T>>
TReturns the enum constant of the specified enum class with the specified name.Methods declared in class Object
getClass, notify, notifyAll, wait, wait, wait
Modifier and TypeMethodDescriptionfinal Class
<?> getClass()
Returns the runtime class of thisObject
.final void
notify()
Wakes up a single thread that is waiting on this object's monitor.final void
Wakes up all threads that are waiting on this object's monitor.final void
wait()
Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final void
wait
(long timeoutMillis) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.final void
wait
(long timeoutMillis, int nanos) Causes the current thread to wait until it is awakened, typically by being notified or interrupted, or until a certain amount of real time has elapsed.
-
Enum Constant Details
-
SINGLE_TYPE_IMPORT_SUBKIND
Single-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_SUBKIND
Type-Import-on-Demand Declaration. A non-static "star" import.- See Java Language Specification:
-
7.5.2 Type-Import-on-Demand Declarations
-
SINGLE_STATIC_IMPORT_SUBKIND
Single-Static-Import Declaration. An import of a static member.- See Java Language Specification:
-
7.5.3 Single-Static-Import Declarations
-
STATIC_IMPORT_ON_DEMAND_SUBKIND
Static-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_SUBKIND
Import Module Declaration. An import declaration of a module.- See Java Language Specification:
-
7.5.5 Import Module Declarations
- Since:
- 25
-
CLASS_SUBKIND
A class declaration. ASubKind
ofSnippet.Kind.TYPE_DECL
.- See Java Language Specification:
-
8.1 Class Declarations
-
INTERFACE_SUBKIND
An interface declaration. ASubKind
ofSnippet.Kind.TYPE_DECL
.- See Java Language Specification:
-
9.1 Interface Declarations
-
ENUM_SUBKIND
An enum declaration. ASubKind
ofSnippet.Kind.TYPE_DECL
.- See Java Language Specification:
-
8.9 Enum Classes
-
RECORD_SUBKIND
A record declaration. ASubKind
ofSnippet.Kind.TYPE_DECL
.- See Java Language Specification:
-
8.10 Record Classes
- Since:
- 17
-
ANNOTATION_TYPE_SUBKIND
An annotation interface declaration. ASubKind
ofSnippet.Kind.TYPE_DECL
.- See Java Language Specification:
-
9.6 Annotation Interfaces
-
METHOD_SUBKIND
A method. The onlySubKind
forSnippet.Kind.METHOD
.- See Java Language Specification:
-
8.4 Method Declarations
-
VAR_DECLARATION_SUBKIND
A variable declaration without initializer. ASubKind
ofSnippet.Kind.VAR
.- See Java Language Specification:
-
8.3 Field Declarations
-
VAR_DECLARATION_WITH_INITIALIZER_SUBKIND
A variable declaration with an initializer expression. ASubKind
ofSnippet.Kind.VAR
.- See Java Language Specification:
-
8.3 Field Declarations
-
TEMP_VAR_EXPRESSION_SUBKIND
An expression whose value has been stored in a temporary variable. ASubKind
ofSnippet.Kind.VAR
.- See Java Language Specification:
-
15 Expressions
-
VAR_VALUE_SUBKIND
A simple variable reference expression. ASubKind
ofSnippet.Kind.EXPRESSION
.- See Java Language Specification:
-
15.11 Field Access Expressions
-
ASSIGNMENT_SUBKIND
An assignment expression. ASubKind
ofSnippet.Kind.EXPRESSION
.- See Java Language Specification:
-
15.26 Assignment Operators
-
OTHER_EXPRESSION_SUBKIND
An expression which has not been wrapped in a temporary variable (reserved). ASubKind
ofSnippet.Kind.EXPRESSION
. -
STATEMENT_SUBKIND
A statement. The onlySubKind
forSnippet.Kind.STATEMENT
.- See Java Language Specification:
-
14.5 Statements
-
UNKNOWN_SUBKIND
An unknown snippet. The onlySubKind
forSnippet.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 thisSubKind
is executable.- Returns:
true
if thisSubKind
can be executed; otherwisefalse
-
hasValue
public boolean hasValue()Indicates whether thisSubKind
is executable and is non-void
.- Returns:
true
if thisSubKind
has a value; otherwisefalse
-
kind
TheSnippet.Kind
that corresponds to thisSubKind
.- Returns:
- the fixed
Kind
for thisSubKind
-