Module java.base
Package java.lang.classfilePREVIEW

# Interface ClassSignature

public sealed interface ClassSignature
`ClassSignature` is a preview API of the Java platform.
Programs can only use `ClassSignature` when preview features are enabled.
Preview features may be removed in a future release, or upgraded to permanent features of the Java platform.
Models the generic signature of a class file, as defined by 4.7.9.

Since:
  22

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static ClassSignaturePREVIEW`
  `of(Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures)`
  Returns a class signature.
  `static ClassSignaturePREVIEW`
  `of(List<Signature.TypeParamPREVIEW> typeParameters, Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures)`
  Returns a class signature.
  `static ClassSignaturePREVIEW`
  `parseFrom(String classSignature)`
  Parses a raw class signature string into a SignaturePREVIEW
  `String`
  `signatureString()`
  Returns the raw signature string.
  `Signature.RefTypeSigPREVIEW`
  `superclassSignature()`
  Returns the instantiation of the superclass in this signature.
  `List<Signature.RefTypeSigPREVIEW>`
  `superinterfaceSignatures()`
  Returns the instantiation of the interfaces in this signature.
  `List<Signature.TypeParamPREVIEW>`
  `typeParameters()`
  Returns the type parameters of this class.

- ## Method Details

  - ### typeParameters

    List<Signature.TypeParamPREVIEW> typeParameters()
    Returns the type parameters of this class.
    Returns:
      the type parameters of this class

  - ### superclassSignature

    Signature.RefTypeSigPREVIEW superclassSignature()
    Returns the instantiation of the superclass in this signature.
    Returns:
      the instantiation of the superclass in this signature

  - ### superinterfaceSignatures

    List<Signature.RefTypeSigPREVIEW> superinterfaceSignatures()
    Returns the instantiation of the interfaces in this signature.
    Returns:
      the instantiation of the interfaces in this signature

  - ### signatureString

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

  - ### of

    static ClassSignaturePREVIEW of(Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures)
    Returns a class signature.
    Parameters:
      `superclassSignature` - the superclass
      `superinterfaceSignatures` - the interfaces
    Returns:
      a class signature

  - ### of

    static ClassSignaturePREVIEW of(List<Signature.TypeParamPREVIEW> typeParameters, Signature.RefTypeSigPREVIEW superclassSignature, Signature.RefTypeSigPREVIEW... superinterfaceSignatures)
    Returns a class signature.
    Parameters:
      `typeParameters` - the type parameters
      `superclassSignature` - the superclass
      `superinterfaceSignatures` - the interfaces
    Returns:
      a class signature

  - ### parseFrom

    static ClassSignaturePREVIEW parseFrom(String classSignature)
    Parses a raw class signature string into a SignaturePREVIEW
    Parameters:
      `classSignature` - the raw class signature string
    Returns:
      class signature