Package Summary Overview Summary

Module java.base
Package java.lang.classfilePREVIEW

# Interface Signature.ClassTypeSig

All Superinterfaces:
  `SignaturePREVIEW`, `Signature.RefTypeSigPREVIEW`, `Signature.ThrowableSigPREVIEW`

Enclosing interface:
  `SignaturePREVIEW`

public static sealed interface Signature.ClassTypeSig extends Signature.RefTypeSigPREVIEW, Signature.ThrowableSigPREVIEW
`ClassTypeSig` is a preview API of the Java platform.
Programs can only use `ClassTypeSig` 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 signature of a possibly-parameterized class or interface type.

Since:
  22

- ## Nested Class Summary

  ## Nested classes/interfaces declared in interface java.lang.classfile.SignaturePREVIEW

  `Signature.ArrayTypeSigPREVIEW, Signature.BaseTypeSigPREVIEW, Signature.ClassTypeSigPREVIEW, Signature.RefTypeSigPREVIEW, Signature.ThrowableSigPREVIEW, Signature.TypeArgPREVIEW, Signature.TypeParamPREVIEW, Signature.TypeVarSigPREVIEW`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `default ClassDesc`
  `classDesc()`
  Returns the class name, as a symbolic descriptor.
  `String`
  `className()`
  Returns the class name.
  `static Signature.ClassTypeSigPREVIEW`
  `of (Signature.ClassTypeSigPREVIEW outerType, ClassDesc className, Signature.TypeArgPREVIEW... typeArgs)`
  Returns a class type signature for an inner class.
  `static Signature.ClassTypeSigPREVIEW`
  `of (Signature.ClassTypeSigPREVIEW outerType, String className, Signature.TypeArgPREVIEW... typeArgs)`
  Returns a class type signature for an inner class.
  `static Signature.ClassTypeSigPREVIEW`
  `of (ClassDesc className, Signature.TypeArgPREVIEW... typeArgs)`
  Returns a class type signature.
  `static Signature.ClassTypeSigPREVIEW`
  `of (String className, Signature.TypeArgPREVIEW... typeArgs)`
  Returns a class type signature.
  `Optional <Signature.ClassTypeSigPREVIEW>`
  `outerType()`
  Returns the signature of the outer type, if any.
  `List <Signature.TypeArgPREVIEW>`
  `typeArgs()`
  Returns the type arguments of the class.

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

  `signatureString`

- ## Method Details

  - ### outerType

    Optional<Signature.ClassTypeSigPREVIEW> outerType()
    Returns the signature of the outer type, if any.
    Returns:
      the signature of the outer type, if any

  - ### className

    String className()
    Returns the class name.
    Returns:
      the class name

  - ### classDesc

    default ClassDesc classDesc()
    Returns the class name, as a symbolic descriptor.
    Returns:
      the class name, as a symbolic descriptor

  - ### typeArgs

    List<Signature.TypeArgPREVIEW> typeArgs()
    Returns the type arguments of the class.
    Returns:
      the type arguments of the class

  - ### of

    static Signature.ClassTypeSigPREVIEW of (ClassDesc className, Signature.TypeArgPREVIEW... typeArgs)
    Returns a class type signature.
    Parameters:
      `className` - the name of the class
      `typeArgs` - signatures of the type arguments
    Returns:
      a class type signature

  - ### of

    static Signature.ClassTypeSigPREVIEW of (Signature.ClassTypeSigPREVIEW outerType, ClassDesc className, Signature.TypeArgPREVIEW... typeArgs)
    Returns a class type signature for an inner class.
    Parameters:
      `outerType` - signature of the outer type
      `className` - the name of the class
      `typeArgs` - signatures of the type arguments
    Returns:
      a class type signature for an inner class

  - ### of

    static Signature.ClassTypeSigPREVIEW of (String className, Signature.TypeArgPREVIEW... typeArgs)
    Returns a class type signature.
    Parameters:
      `className` - the name of the class
      `typeArgs` - signatures of the type arguments
    Returns:
      a class type signature

  - ### of

    static Signature.ClassTypeSigPREVIEW of (Signature.ClassTypeSigPREVIEW outerType, String className, Signature.TypeArgPREVIEW... typeArgs)
    Returns a class type signature for an inner class.
    Parameters:
      `outerType` - signature of the outer type
      `className` - the name of the class
      `typeArgs` - signatures of the type arguments
    Returns:
      a class type signature for an inner class