CONSTANT_MethodHandle_info structure, or a symbolic
reference to a method handle, in the constant pool
of a class file. The method handle directly accesses an accessible
method, field, or constructor.
The use of a MethodHandleEntry is modeled by a DirectMethodHandleDesc. Conversions are through ConstantPoolBuilder#methodHandleEntry(DirectMethodHandleDesc) and asSymbol().
A method handle entry is composite:
MethodHandleEntry( int refKind, MemberRefEntry reference )
refKind is in the range [1, 9].
CONSTANT_MethodHandle_info Structure
ConstantPoolBuilder::methodHandleEntry
| Modifier and Type | Method and Description |
|---|---|
| public DirectMethodHandleDesc | Returns: a symbolic descriptor for this method handleReturns a symbolic descriptor for this method handle. |
| public default ConstantDesc | constantValue()
Implements java. Returns a symbolic descriptor of this constant. |
| public int | |
| public MemberRefEntry | Returns: the constant pool entry describing the field or method, according to the reference kindReturns the constant pool entry describing the field or method, according to the reference kind. |
| asSymbol | back to summary |
|---|---|
| public DirectMethodHandleDesc asSymbol() Returns a symbolic descriptor for this method handle.
| |
| constantValue | back to summary |
|---|---|
| public default ConstantDesc constantValue() Implements java. Doc from java. Returns a symbolic descriptor of this constant.
This is equivalent to
| |
| kind | back to summary |
|---|---|
| public int kind() Returns the reference kind of this method handle (JVMS 4.4.8).
| |
| reference | back to summary |
|---|---|
| public MemberRefEntry reference() Returns the constant pool entry describing the field or method, according to the reference kind.
| |