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

Module java.base
Package java.lang.classfilePREVIEW

# Interface Signature.ArrayTypeSig

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

Enclosing interface:
  `SignaturePREVIEW`

public static sealed interface Signature.ArrayTypeSig extends Signature.RefTypeSigPREVIEW
`ArrayTypeSig` is a preview API of the Java platform.
Programs can only use `ArrayTypeSig` 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 an array 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
  `SignaturePREVIEW`
  `componentSignature()`
  Returns the signature of the component type.
  `static Signature.ArrayTypeSigPREVIEW`
  `of(int dims, SignaturePREVIEW componentSignature)`
  Returns a signature for an array type.
  `static Signature.ArrayTypeSigPREVIEW`
  `of(SignaturePREVIEW componentSignature)`
  Returns a signature for an array type.

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

  `signatureString`

- ## Method Details

  - ### componentSignature

    SignaturePREVIEW componentSignature()
    Returns the signature of the component type.
    Returns:
      the signature of the component type

  - ### of

    static Signature.ArrayTypeSigPREVIEW of(SignaturePREVIEW componentSignature)
    Returns a signature for an array type.
    Parameters:
      `componentSignature` - the component type
    Returns:
      a signature for an array type

  - ### of

    static Signature.ArrayTypeSigPREVIEW of(int dims, SignaturePREVIEW componentSignature)
    Returns a signature for an array type.
    Parameters:
      `dims` - the dimension of the array
      `componentSignature` - the component type
    Returns:
      a signature for an array type