TypeDescriptor (Java SE 14 & JDK 14)
Description: declaration: module: java.base, package: java.lang.invoke, interface: TypeDescriptor
Keywords: java.lang.invoke.TypeDescriptor interface

Module java.base
Package java.lang.invoke

# Interface TypeDescriptor

All Known Subinterfaces:
  `ClassDesc`, `MethodTypeDesc`, `TypeDescriptor.OfField<F>`, `TypeDescriptor.OfMethod<F,​M>`

All Known Implementing Classes:
  `Class`, `MethodType`

    public interface TypeDescriptor

An entity that has a field or method type descriptor

See Java Virtual Machine Specification:
  4.3.2 Field Descriptors
  4.3.3 Method Descriptors
Since:
  12

- ## Nested Class Summary

  Nested Classes
  Modifier and Type | Interface | Description
  --- | --- | ---
  `static interface` | `TypeDescriptor.OfField<F extends TypeDescriptor.OfField<F>>` | An entity that has a field type descriptor
  `static interface` | `TypeDescriptor.OfMethod<F extends TypeDescriptor.OfField<F>,​M extends TypeDescriptor.OfMethod<F,​M>>` | An entity that has a method type descriptor

- ## Method Summary

  Modifier and Type | Method | Description
  --- | --- | ---
  `String` | `descriptorString()` | Return the type descriptor string for this instance, which must be either a field type descriptor (JVMS 4.3.2) or method type descriptor (JVMS 4.3.3).

- ## Method Details

  - ### descriptorString

    String descriptorString()
    Return the type descriptor string for this instance, which must be either a field type descriptor (JVMS 4.3.2) or method type descriptor (JVMS 4.3.3).
    Returns:
      the type descriptor
    See Java Virtual Machine Specification:
      4.3.2 Field Descriptors
      4.3.3 Method Descriptors