Uses of Interface java.lang.constant.DirectMethodHandleDesc (Java SE 25 & JDK 25)
Description: use: module: java.base, package: java.lang.constant, interface: DirectMethodHandleDesc

# Uses of Interface
java.lang.constant.DirectMethodHandleDesc

Packages that use DirectMethodHandleDesc
Package
Description
java.lang.classfile.constantpool
Provides interfaces describing constant pool entries for the `java.lang.classfile` library.
java.lang.classfile.instruction
Provides interfaces describing code instructions for the `java.lang.classfile` library.
java.lang.constant
Classes and interfaces to represent nominal descriptors for run-time entities such as classes or method handles, and classfile entities such as constant pool entries or `invokedynamic` call sites.

- ## Uses of DirectMethodHandleDesc in java.lang.classfile.constantpool

  Methods in java.lang.classfile.constantpool that return DirectMethodHandleDesc
  Modifier and Type
  Method
  Description
  `DirectMethodHandleDesc`
  MethodHandleEntry.`asSymbol()`
  Returns a symbolic descriptor for this method handle.
  Methods in java.lang.classfile.constantpool with parameters of type DirectMethodHandleDesc
  Modifier and Type
  Method
  Description
  `default BootstrapMethodEntry`
  ConstantPoolBuilder.`bsmEntry(DirectMethodHandleDesc methodReference, List<ConstantDesc> arguments)`
  Returns a `BootstrapMethodEntry` describing the provided bootstrap method and arguments.
  `default MethodHandleEntry`
  ConstantPoolBuilder.`methodHandleEntry(DirectMethodHandleDesc descriptor)`
  Returns a `MethodHandleEntry` describing the same method handle as the given `DirectMethodHandleDesc`.

- ## Uses of DirectMethodHandleDesc in java.lang.classfile.instruction

  Methods in java.lang.classfile.instruction that return DirectMethodHandleDesc
  Modifier and Type
  Method
  Description
  `default DirectMethodHandleDesc`
  InvokeDynamicInstruction.`bootstrapMethod()`
  Returns the bootstrap method of the call site.

- ## Uses of DirectMethodHandleDesc in java.lang.constant

  Fields in java.lang.constant declared as DirectMethodHandleDesc
  Modifier and Type
  Field
  Description
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_CLASS_DATA`
  `MethodHandleDesc` representing `MethodHandles.classData`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_CLASS_DATA_AT`
  `MethodHandleDesc` representing `MethodHandles.classDataAt`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_ENUM_CONSTANT`
  `MethodHandleDesc` representing `ConstantBootstraps.enumConstant`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_EXPLICIT_CAST`
  `MethodHandleDesc` representing `ConstantBootstraps.explicitCast`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_GET_STATIC_FINAL`
  `MethodHandleDesc` representing `ConstantBootstraps.getStaticFinal`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_INVOKE`
  `MethodHandleDesc` representing `ConstantBootstraps.invoke`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_NULL_CONSTANT`
  `MethodHandleDesc` representing `ConstantBootstraps.nullConstant`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_PRIMITIVE_CLASS`
  `MethodHandleDesc` representing `ConstantBootstraps.primitiveClass`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_VARHANDLE_ARRAY`
  `MethodHandleDesc` representing `ConstantBootstraps.arrayVarHandle`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_VARHANDLE_FIELD`
  `MethodHandleDesc` representing `ConstantBootstraps.fieldVarHandle`
  `static final DirectMethodHandleDesc`
  ConstantDescs.`BSM_VARHANDLE_STATIC_FIELD`
  `MethodHandleDesc` representing `ConstantBootstraps.staticFieldVarHandle`
  Methods in java.lang.constant that return DirectMethodHandleDesc
  Modifier and Type
  Method
  Description
  `DirectMethodHandleDesc`
  DynamicConstantDesc.`bootstrapMethod()`
  Returns a `MethodHandleDesc` describing the bootstrap method for this constant.
  `static DirectMethodHandleDesc`
  MethodHandleDesc.`of(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, String lookupDescriptor)`
  Creates a MethodHandleDesc corresponding to an invocation of a declared method, invocation of a constructor, or access to a field.
  `static DirectMethodHandleDesc`
  ConstantDescs.`ofCallsiteBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes)`
  Returns a `MethodHandleDesc` corresponding to a bootstrap method for an `invokedynamic` callsite, which is a static method whose leading parameter types are `Lookup`, `String`, and `MethodType`.
  `static DirectMethodHandleDesc`
  ConstantDescs.`ofConstantBootstrap(ClassDesc owner, String name, ClassDesc returnType, ClassDesc... paramTypes)`
  Returns a `MethodHandleDesc` corresponding to a bootstrap method for a dynamic constant, which is a static method whose leading arguments are `Lookup`, `String`, and `Class`.
  `static DirectMethodHandleDesc`
  MethodHandleDesc.`ofConstructor(ClassDesc owner, ClassDesc... paramTypes)`
  Returns a MethodHandleDesc corresponding to invocation of a constructor
  `static DirectMethodHandleDesc`
  MethodHandleDesc.`ofField(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String fieldName, ClassDesc fieldType)`
  Creates a MethodHandleDesc corresponding to a method handle that accesses a field.
  `static DirectMethodHandleDesc`
  MethodHandleDesc.`ofMethod(DirectMethodHandleDesc.Kind kind, ClassDesc owner, String name, MethodTypeDesc lookupMethodType)`
  Creates a MethodHandleDesc corresponding to an invocation of a declared method or constructor.
  Methods in java.lang.constant with parameters of type DirectMethodHandleDesc
  Modifier and Type
  Method
  Description
  `static DynamicCallSiteDesc`
  DynamicCallSiteDesc.`of(DirectMethodHandleDesc bootstrapMethod, MethodTypeDesc invocationType)`
  Creates a nominal descriptor for an `invokedynamic` call site whose bootstrap method has no static arguments and for which the name parameter is `ConstantDescs.DEFAULT_NAME`.
  `static DynamicCallSiteDesc`
  DynamicCallSiteDesc.`of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType)`
  Creates a nominal descriptor for an `invokedynamic` call site whose bootstrap method has no static arguments.
  `static DynamicCallSiteDesc`
  DynamicCallSiteDesc.`of(DirectMethodHandleDesc bootstrapMethod, String invocationName, MethodTypeDesc invocationType, ConstantDesc... bootstrapArgs)`
  Creates a nominal descriptor for an `invokedynamic` call site.
  `static <T> DynamicConstantDesc<T>`
  DynamicConstantDesc.`of(DirectMethodHandleDesc bootstrapMethod)`
  Returns a nominal descriptor for a dynamic constant whose bootstrap has no static arguments, whose name parameter is `ConstantDescs.DEFAULT_NAME`, and whose type parameter is always the same as the bootstrap method return type.
  `static <T> DynamicConstantDesc<T>`
  DynamicConstantDesc.`of(DirectMethodHandleDesc bootstrapMethod, ConstantDesc... bootstrapArgs)`
  Returns a nominal descriptor for a dynamic constant whose name parameter is `ConstantDescs.DEFAULT_NAME`, and whose type parameter is always the same as the bootstrap method return type.
  `static <T> ConstantDesc`
  DynamicConstantDesc.`ofCanonical(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>`
  DynamicConstantDesc.`ofNamed(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs)`
  Returns a nominal descriptor for a dynamic constant.
  Constructors in java.lang.constant with parameters of type DirectMethodHandleDesc
  Modifier
  Constructor
  Description
  `protected`
  `DynamicConstantDesc(DirectMethodHandleDesc bootstrapMethod, String constantName, ClassDesc constantType, ConstantDesc... bootstrapArgs)`
  Creates a nominal descriptor for a dynamic constant.