Serializable
, Comparable<DirectMethodHandleDesc.Kind>
, Constable
DirectMethodHandleDesc
public static enum DirectMethodHandleDesc.Kind extends Enum<DirectMethodHandleDesc.Kind>
Enum.EnumDesc<E extends Enum<E>>
Enum Constant | Description |
---|---|
CONSTRUCTOR |
A method handle for a constructor |
GETTER |
A method handle for a read accessor for an instance field |
INTERFACE_SPECIAL |
A method handle for an interface method invoked as with invokespecial
|
INTERFACE_STATIC |
A method handle for a method invoked as with invokestatic
|
INTERFACE_VIRTUAL |
A method handle for a method invoked as with invokeinterface
|
SETTER |
A method handle for a write accessor for an instance field |
SPECIAL |
A method handle for a method invoked as with invokespecial
|
STATIC |
A method handle for a method invoked as with invokestatic
|
STATIC_GETTER |
A method handle for a read accessor for a static field |
STATIC_SETTER |
A method handle for a write accessor for a static field |
VIRTUAL |
A method handle for a method invoked as with invokevirtual
|
Modifier and Type | Field | Description |
---|---|---|
final boolean |
isInterface |
Is this an interface |
final int |
refKind |
The corresponding refKind value for this kind of method handle, as defined by MethodHandleInfo
|
Modifier and Type | Method | Description |
---|---|---|
static DirectMethodHandleDesc.Kind |
valueOf |
Returns the enumeration member with the given refKind field. |
static DirectMethodHandleDesc.Kind |
valueOf |
Returns the enumeration member with the given the refKind and isInterface arguments. |
static DirectMethodHandleDesc.Kind |
valueOf |
Returns the enum constant of this class with the specified name. |
static DirectMethodHandleDesc.Kind[] |
values() |
Returns an array containing the constants of this enum class, in the order they are declared. |
public static final DirectMethodHandleDesc.Kind STATIC
invokestatic
public static final DirectMethodHandleDesc.Kind INTERFACE_STATIC
invokestatic
public static final DirectMethodHandleDesc.Kind VIRTUAL
invokevirtual
public static final DirectMethodHandleDesc.Kind INTERFACE_VIRTUAL
invokeinterface
public static final DirectMethodHandleDesc.Kind SPECIAL
invokespecial
public static final DirectMethodHandleDesc.Kind INTERFACE_SPECIAL
invokespecial
public static final DirectMethodHandleDesc.Kind CONSTRUCTOR
public static final DirectMethodHandleDesc.Kind GETTER
public static final DirectMethodHandleDesc.Kind SETTER
public static final DirectMethodHandleDesc.Kind STATIC_GETTER
public static final DirectMethodHandleDesc.Kind STATIC_SETTER
public final int refKind
refKind
value for this kind of method handle, as defined by MethodHandleInfo
public final boolean isInterface
public static DirectMethodHandleDesc.Kind[] values()
public static DirectMethodHandleDesc.Kind valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is nullpublic static DirectMethodHandleDesc.Kind valueOf(int refKind)
refKind
field. Behaves as if valueOf(refKind, false)
. As a special case, if refKind
is REF_invokeInterface
(9) then the isInterface
field will be true.refKind
- refKind of desired memberIllegalArgumentException
- if there is no such memberpublic static DirectMethodHandleDesc.Kind valueOf(int refKind, boolean isInterface)
refKind
and isInterface
arguments. For most values of refKind
there is an exact match regardless of the value of isInterface
. These are: REF_invokeVirtual
which matches to VIRTUAL
REF_invokeInterface
which matches to INTERFACE_VIRTUAL
REF_newInvokeSpecial
which matches to CONSTRUCTOR
REF_getField
which matches to GETTER
REF_putField
which matches to SETTER
REF_getStatic
which matches to STATIC_GETTER
REF_putStatic
which matches to STATIC_SETTER
isInterface
: REF_invokeStatic
which matches to STATIC
or INTERFACE_STATIC
REF_invokeSpecial
which matches to SPECIAL
or INTERFACE_SPECIAL
refKind
- refKind of desired memberisInterface
- whether desired member is for interface methodsIllegalArgumentException
- if there is no such member
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/constant/DirectMethodHandleDesc.Kind.html