Package Summary Overview Summary

Module java.base
Package java.lang.classfilePREVIEW

# Interface Signature

All Known Subinterfaces:
  `Signature.ArrayTypeSigPREVIEW`, `Signature.BaseTypeSigPREVIEW`, `Signature.ClassTypeSigPREVIEW`, `Signature.RefTypeSigPREVIEW`, `Signature.ThrowableSigPREVIEW`, `Signature.TypeVarSigPREVIEW`

public sealed interface Signature permits Signature.RefTypeSigPREVIEW, Signature.ThrowableSigPREVIEW, Signature.BaseTypeSigPREVIEW
`Signature` is a preview API of the Java platform.
Programs can only use `Signature` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models generic Java type signatures, as defined in 4.7.9.1.

Sealed Class Hierarchy Graph:
Since:
  22

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Interface
  Description
  `static interface`
  `Signature.ArrayTypeSigPREVIEW`
  Preview.
  Models the signature of an array type.
  `static interface`
  `Signature.BaseTypeSigPREVIEW`
  Preview.
  Models the signature of a primitive type or void
  `static interface`
  `Signature.ClassTypeSigPREVIEW`
  Preview.
  Models the signature of a possibly-parameterized class or interface type.
  `static interface`
  `Signature.RefTypeSigPREVIEW`
  Preview.
  Models the signature of a reference type, which may be a class, interface, type variable, or array type.
  `static interface`
  `Signature.ThrowableSigPREVIEW`
  Preview.
  Models a signature for a throwable type.
  `static interface`
  `Signature.TypeArgPREVIEW`
  Preview.
  Models the type argument.
  `static interface`
  `Signature.TypeParamPREVIEW`
  Preview.
  Models a signature for a type parameter of a generic class or method.
  `static interface`
  `Signature.TypeVarSigPREVIEW`
  Preview.
  Models the signature of a type variable.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static SignaturePREVIEW`
  `of (ClassDesc classDesc)`
  Returns a Java type signature.
  `static SignaturePREVIEW`
  `parseFrom (String javaTypeSignature)`
  Parses generic Java type signature from raw string
  `String`
  `signatureString()`
  Returns the raw signature string.

- ## Method Details

  - ### signatureString

    String signatureString()
    Returns the raw signature string.
    Returns:
      the raw signature string

  - ### parseFrom

    static SignaturePREVIEW parseFrom (String javaTypeSignature)
    Parses generic Java type signature from raw string
    Parameters:
      `javaTypeSignature` - raw Java type signature string
    Returns:
      Java type signature

  - ### of

    static SignaturePREVIEW of (ClassDesc classDesc)
    Returns a Java type signature.
    Parameters:
      `classDesc` - the symbolic description of the Java type
    Returns:
      a Java type signature