Class Enum.EnumDesc<E extends Enum<E>>
java.lang.Object
java.lang.constant.DynamicConstantDesc<E>
java.lang.Enum.EnumDesc<E>
- Type Parameters:
E- the type of the enum constant
- All Implemented Interfaces:
ConstantDesc
A nominal descriptor for an
enum constant.- Since:
- 12
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Enum<E>>
Enum.EnumDesc<E> Returns a nominal descriptor for the specifiedenumclass and nameMethods declared in class DynamicConstantDesc
bootstrapArgs, bootstrapArgsList, bootstrapMethod, constantName, constantType, equals, hashCode, of, of, ofCanonical, ofNamed, resolveConstantDesc, toStringModifier and TypeMethodDescriptionReturns the bootstrap arguments for this constant.Returns the bootstrap arguments for this constant as an immutableList.Returns aMethodHandleDescdescribing the bootstrap method for this constant.Returns the name that would appear in theNameAndTypeoperand of theLDCfor this constant.Returns aClassDescdescribing the type that would appear in theNameAndTypeoperand of theLDCfor this constant.final booleanCompares the specified object with this descriptor for equality.final inthashCode()Returns a hash code value for this object.static <T> DynamicConstantDesc<T> of(DirectMethodHandleDesc bootstrapMethod) Returns a nominal descriptor for a dynamic constant whose bootstrap has no static arguments, whose name parameter isConstantDescs.DEFAULT_NAME, and whose type parameter is always the same as the bootstrap method return type.static <T> DynamicConstantDesc<T> of(DirectMethodHandleDesc bootstrapMethod, ConstantDesc... bootstrapArgs) Returns a nominal descriptor for a dynamic constant whose name parameter isConstantDescs.DEFAULT_NAME, and whose type parameter is always the same as the bootstrap method return type.static <T> ConstantDescofCanonical(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc[] bootstrapArgs) Returns a nominal descriptor for a dynamic constant, transforming it into a more specific type if the constant bootstrap is a well-known one and a more specific nominal descriptor type (e.g., ClassDesc) is available.static <T> DynamicConstantDesc<T> ofNamed(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs) Returns a nominal descriptor for a dynamic constant.toString()Returns a compact textual description of this constant description, including the bootstrap method, the constant name and type, and the static bootstrap arguments.Methods declared in class Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitModifier and TypeMethodDescriptionprotected Objectclone()Creates and returns a copy of this object.protected voidfinalize()Deprecated, for removal: This API element is subject to removal in a future version.Finalization is deprecated and subject to removal in a future release.final Class<?> getClass()Returns the runtime class of thisObject.final voidnotify()Wakes up a single thread that is waiting on this object's monitor.final voidWakes up all threads that are waiting on this object's monitor.final voidwait()Causes the current thread to wait until it is awakened, typically by being notified or interrupted.final voidwait(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 voidwait(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.
-
Method Details
-
of
Returns a nominal descriptor for the specifiedenumclass and name- Type Parameters:
E- the type of the enum constant- Parameters:
enumClass- aClassDescdescribing theenumclassconstantName- the unqualified name of the enum constant- Returns:
- the nominal descriptor
- Throws:
NullPointerException- if any argument is null- See Java Virtual Machine Specification:
-
4.2.2 Unqualified Names
- Since:
- 12
-