Spec-Zone.ru › OpenJDK 25

Interface DirectMethodHandleDesc

All Superinterfaces:
ConstantDesc, MethodHandleDesc
public sealed interface DirectMethodHandleDesc extends MethodHandleDesc
A nominal descriptor for a direct MethodHandle. A DirectMethodHandleDesc corresponds to a Constant_MethodHandle_info entry in the constant pool of a classfile.
Since:
12

Nested Class Summary

Modifier and Type Interface Description
static enum  DirectMethodHandleDesc.Kind
Kinds of method handles that can be described with DirectMethodHandleDesc.

Method Summary

Modifier and Type Method Description
boolean isOwnerInterface()
Indicates if the method is declared by an interface
DirectMethodHandleDesc.Kind kind()
Returns the kind of the method handle described by this nominal descriptor.
String lookupDescriptor()
Returns the lookup descriptor of the method handle described by this descriptor, after adjusting for the invocation mode.
String methodName()
Returns the name of the method or field described by this nominal descriptor.
ClassDesc owner()
Returns a ClassDesc describing the class declaring the method or field described by this nominal descriptor.
int refKind()
Returns the refKind of the method handle described by this nominal reference, as defined by MethodHandleInfo.

Methods declared in interface MethodHandleDesc

asType, equals, invocationType, resolveConstantDesc

Method Details

kind

DirectMethodHandleDesc.Kind kind()
Returns the kind of the method handle described by this nominal descriptor.
Returns:
the DirectMethodHandleDesc.Kind

refKind

int refKind()
Returns the refKind of the method handle described by this nominal reference, as defined by MethodHandleInfo.
Returns:
the reference kind

isOwnerInterface

boolean isOwnerInterface()
Indicates if the method is declared by an interface
Returns:
true if the method is declared by an interface

owner

ClassDesc owner()
Returns a ClassDesc describing the class declaring the method or field described by this nominal descriptor.
Returns:
the class declaring the method or field

methodName

String methodName()
Returns the name of the method or field described by this nominal descriptor. For constructors, returns the reserved name "<init>".
Returns:
the name of the method or field

lookupDescriptor

String lookupDescriptor()
Returns the lookup descriptor of the method handle described by this descriptor, after adjusting for the invocation mode. This will correspond to either a method type descriptor string (for methods and constructors), or a field descriptor string (for field access method handles). The lookup descriptor string is in the same format as accepted by MethodHandleDesc.of(Kind, ClassDesc, String, String).
Returns:
the lookup descriptor string

Report a bug or suggest an enhancement
For further API reference and developer documentation see the Java SE Documentation, which contains more detailed, developer-targeted descriptions with conceptual overviews, definitions of terms, workarounds, and working code examples. Other versions.
Java is a trademark or registered trademark of Oracle and/or its affiliates in the US and other countries.
Copyright © 1993, 2025, Oracle and/or its affiliates, 500 Oracle Parkway, Redwood Shores, CA 94065 USA.
All rights reserved. Use is subject to license terms and the documentation redistribution policy.

© 1993, 2025, 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/25/docs/api/java.base/java/lang/constant/DirectMethodHandleDesc.html

Spec-Zone.ru

Настройки Оффлайн Что нового Помощь О нас
Spec-Zone .ru
спецификации, руководства, описания, API