MethodRefEntry (Java SE 22 & JDK 22)
Description: declaration: module: java.base, package: java.lang.classfile.constantpool, interface: MethodRefEntry
Keywords: java.lang.classfile.constantpool.MethodRefEntry interface

Module java.base
Package java.lang.classfile.constantpoolPREVIEW

# Interface MethodRefEntry

All Superinterfaces:
  `ClassFileElementPREVIEW`, `MemberRefEntryPREVIEW`, `PoolEntryPREVIEW`, `WritableElementPREVIEW<PoolEntryPREVIEW>`

public sealed interface MethodRefEntry extends MemberRefEntryPREVIEW
`MethodRefEntry` is a preview API of the Java platform.
Programs can only use `MethodRefEntry` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models a `CONSTANT_MethodRef_info` constant in the constant pool of a classfile.

See Java Virtual Machine Specification:
  4.4.2 The CONSTANT_Fieldref_info, CONSTANT_Methodref_info, and CONSTANT_InterfaceMethodref_info Structures
Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default MethodTypeDesc`
  `typeSymbol()`
  Returns a symbolic descriptor for the method's type.

  ### Methods declared in interface java.lang.classfile.constantpool.MemberRefEntryPREVIEW

  `name, nameAndType, owner, type`

  ### Methods declared in interface java.lang.classfile.constantpool.PoolEntryPREVIEW

  `constantPool, index, tag, width`

  ### Methods declared in interface java.lang.classfile.WritableElementPREVIEW

  `writeTo`

- ## Method Details

  - ### typeSymbol

    default MethodTypeDesc typeSymbol()
    Returns a symbolic descriptor for the method's type.
    Returns:
      a symbolic descriptor for the method's type